applescript - attachment at begining of email -


i running applescript. purpose open mac mail , create new message attachment located on users' desktop.

it working, ... attachment being inserted after email signature , need attachment located in front of email signature (at beginning of email).

thank in advance can provide!

code below ...

set theattachment "{thedesktoppath , file name}" set recipientaddress "joe@joe.com" set recipientname "joe" set thesubject "estimate"  tell application ”mail” set newmessage make new outgoing message properties {subject:thesubject, visible:true} tell newmessage make new recipient properties {name:recipientname, address:recipientaddress} tell content of newmessage make new attachment properties {file name:theattachment alias} @ after last paragraph end tell end tell activate end tell 

change "after last" "before first" so:

set theattachment "{thedesktoppath , file name}" set recipientaddress "joe@joe.com" set recipientname "joe" set thesubject "estimate"  tell application "mail"     set newmessage make new outgoing message properties {subject:thesubject, visible:true}     tell newmessage         make new recipient properties {name:recipientname, address:recipientaddress}         tell content of newmessage             make new attachment properties {file name:theattachment alias} @ before first paragraph         end tell     end tell     activate end tell 

Comments

Popular posts from this blog

javascript - Bootstrap Popover: iOS Safari strange behaviour -

Magento/PHP - Get phones on all members in a customer group -

session - Logging Out Using PHP -