Jump to content
Salesforce and other SMB Solutions are coming soon. ×

pure Applescript Mailing cFunction


Recommended Posts

Purely Applescript Mail cFunction

( technically this is just a wrapper )

This is the general version, I left out attachments for this version. I should have a multiple attachment work around in the next version.


Just pump this cF in the calculation section of the Perform Applescript Script step and your good to go. :)

or just mod the code to be used as a stand alone applescript, *shrugs* either way it works.


Function name : Mail


Function Parameters:


To // The recipient email address

From // The sending account you want to use

Subject // Le subject :P

Body // Body of the email

Send // if this field = "yes" then it automatically sends the email, useful for mail lists




"tell application \"Mail\""&¶&

" activate"&¶&

" set Contact_Email to \""& To &"\""&¶&

" set Sending_Account to \""& From &"\""&¶&

" set Email_Subject to \""& Subject &"\""&¶&

" set Email_Body to \""& ¶&


Substitute( Body ;["\"";"\\\""];["\”";"\\\""]) // filters most harmful quotes out of email.



"set NewEmail to (make new outgoing message with properties {visible:true, subject:Email_Subject, sender:Sending_Account, content:Email_Body})"&¶&

"tell NewEmail"&¶&

"make new to recipient with properties {address:Contact_Email}"&¶&

If ( send = "yes" ; ( "Send" &¶ ) ; "" )& // toggles auto send

"end tell"&¶&

"end tell"

Link to comment
Share on other sites

This thread is quite old. Please start a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

Terms of Use