Send Email once added to iTunes

Talk, speculate, discuss, pontificate. As long as it pertains to Hazel.

Moderators: Mr_Noodle, Moderators

Send Email once added to iTunes Tue Jan 15, 2013 2:14 am • by BoJaques
I am trying to setup some code to send me a notification email once a file has been added to my iTunes library.

I am currently using...
Code: Select all
      tell application "Mail"
         activate
         set theNewMessage to make new outgoing message with properties {subject:"Subject TV Added", content:"For your viewing enjoyment, we have added " & theFile & " to your iTunes library, visible:true}
         tell theNewMessage
            make new to recipient at end with properties {address:"MyEmail@gmail.com"}
            send theNewmessage
         end tell
      end tell


The error I am getting is Expected "," or "}" but found identifier. and it is highlighting MyEmail

I am a noob to applescript. Any Suggestions?
BoJaques
 
Posts: 2
Joined: Mon Aug 20, 2012 1:21 pm

Re: Send Email once added to iTunes Tue Jan 15, 2013 10:56 am • by cdavis
Try adding this to your script:


tell theNewMessage

make new to recipient at end of to recipients with properties

{address:"MyEmail@gmail.com"}

send
cdavis
 
Posts: 7
Joined: Tue Nov 13, 2012 6:29 pm


Return to Open Discussion