How to generate a routine email

Discussion in 'Mac Programming' started by JamisonSmith, Feb 21, 2009.

  1. macrumors newbie

    Joined:
    Feb 21, 2009
    #1
    Hello all,

    I am trying to set up a way to send out a monthly reminder email automatically to a select distribution group. The distribution group would always be the same and the subject and body of the email would be the same. I primarily use Entourage as my email client, but could use Mail if needed. My OS is Tiger if that makes a difference.

    I have tried it in Automator which I can get it to do prompt and send and email, but I can't seem to figure out how to make it happen on a select time scale, i.e. every 1st of month at 12:00pm.

    I have also tried scripting it. The script is below and Entourage keeps giving an error with the coding. Any help is greatly appreciated.

    Thanks!

    Jamison


    tell application "Microsoft Entourage"
    set newMessage to make new outgoing message with properties {subject:"ATS Monthly Discharge and Recharge Reminder", content:"Please use this email as a reminder to fully discharge and recharge your ATS VHF receiver. Thank you. Jamie"}
    tell newMessage
    make new to recipient at end of to recipients with properties {name:"Jamison Smith", address:"JamisonMSmith@gmail.com"}
    end tell
    send newMessage
    end tell
     
  2. Moderator emeritus

    ergdegdeg

    Joined:
    Oct 13, 2007
    Location:
    Nebraska
    #2
  3. thread starter macrumors newbie

    Joined:
    Feb 21, 2009
    #3
    Thanks!

    Ergdegdeg,

    Thanks for the suggestion, I will try Scheduler and see how it works for what I want to do.

    Take care,

    Jamison
     
  4. macrumors 6502

    cdcastillo

    Joined:
    Dec 22, 2007
    Location:
    The cesspit of civilization
    #4
    Or you can set a repeating monthly event in iCal and set the "alarm" to the automator action.

    Easier and no extra downloads required.
     
  5. thread starter macrumors newbie

    Joined:
    Feb 21, 2009
    #5
    Thanks!

    Thanks cdcastillo!

    Is this a feature on iCal on Leopard? I looked on my version of iCal and the options are: none, message, message with sound, email, open file, run script

    I tried the email option and it only sent me an email not the participants and I couldn't find an option to send to multiple recipients.

    I also tried the script option and attempted to write a short script to draft and send a template email and I couldn't get it to work (see my first post).

    Maybe I am missing something n my iCal. I would prefer to do this withour having to download any additional software.

    Thanks again.

    Jamison
     
  6. macrumors newbie

    Joined:
    Feb 21, 2009
    #6
    You could also try to use the 'mail' command with cron. This may involve some simple shell scripting. You can start by verifying that mail works. Simply open a Terminal and type in 'mail <YourEmailAddress>'. If you receive the mail in your favorite email reader then do a 'man cron' to see how to setup a repeating job.
     
  7. macrumors 6502

    cdcastillo

    Joined:
    Dec 22, 2007
    Location:
    The cesspit of civilization
    #7
    You save your automator workflow to your disk, then select open file in the alarm, and in the dialog box select the saved workflow.

    Do not foget to set the event to repeat itself.
     
  8. thread starter macrumors newbie

    Joined:
    Feb 21, 2009
    #8
    Thanks again!

    Thank you again cdcastillo! I set it up this way and tested it and it worked perfectly. This is a very simple solution once you know how to do it.

    Take care,

    Jamison
     

Share This Page