schedule a delivery in mail

Discussion in 'Mac Programming' started by I'm a Mac, Apr 17, 2008.

  1. I'm a Mac macrumors 6502

    Joined:
    Nov 5, 2007
    #1
    I was wondering if it was possible to schedule a delivery in an email- I download the mail scripts applications, but I wanted to change some things, so I was wondering if there was a basic applescript that lets me schedule an email.
     
  2. lee1210 macrumors 68040

    lee1210

    Joined:
    Jan 10, 2005
    Location:
    Dallas, TX
    #2
    This should do it:

    Code:
    tell application "Mail"
    	activate
    	set newMessage to (make new outgoing message with properties {subject:"This is the subject", content:"Test content"})
    	tell newMessage
    		make new to recipient at beginning of to recipients ¬
    			with properties {address:"test@address.com"}
    	end tell
    	send newMessage
    	
    end tell
    -Lee
     
  3. HiRez macrumors 603

    HiRez

    Joined:
    Jan 6, 2004
    Location:
    Western US
    #3
    Do you mean schedule as in setup a mail to be sent ASAP, or schedule one for later delivery at a specific time/date? Two different things, but if the latter you could maybe script Calendar.app, one of the choices for alarm is to send an email. Or at a lower level, add a cron entry.
     
  4. I'm a Mac thread starter macrumors 6502

    Joined:
    Nov 5, 2007

Share This Page