How can I permanently delete emails from the Junk folder?
I have this Apple Script that I use to get rid of emails in my Junk folder that are over two days old. The problem is that it moves them to Trash and I want to actually delete them. Is that possible?
tell application "Mail"
set theAccount to account "Google"
set theMailbox to mailbox "Junk" of theAccount
set theMessages to messages of theMailbox
repeat with eachMessage in theMessages
set messageDate to date received of eachMessage
set currentDate to (current date)
set dateDifference to (currentDate - messageDate) / days
if dateDifference > 2 then
delete eachMessage
end if
end repeat
end tell
[Re-Titled by Moderator]
iMac 24″