Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Automatically sending an attachment using Apple Mail.



here is some code that I am pretty sure is working..

set att to "MACHD:Users:me:Desktop:" & "myphoto.jpg" as alias
set theSubject to "The subject text"
set theBody to "The text of the message"
set theDestinationEmail to "email@hidden"
tell application "Mail"
set the new_message to ¬
(make new outgoing message with properties ¬
{visible:true, subject:theSubject, sender:"email@hidden", content:theBody & return})
tell the new_message
make new to recipient at end of to recipients with properties {address:theDestinationEmail}
tell content
make new attachment with properties {file name:att} at after the last character
end tell
end tell
end tell


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-studio mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-studio/email@hidden

This email sent to email@hidden
References: 
 >Automatically sending an attachment using Apple Mail. (From: "Rich Green" <email@hidden>)
 >Re: Automatically sending an attachment using Apple Mail. (From: Andreas Kiel <email@hidden>)
 >Re: Automatically sending an attachment using Apple Mail. (From: Wayne Melrose <email@hidden>)
 >Re: Automatically sending an attachment using Apple Mail. (From: Andreas Kiel <email@hidden>)
 >Re: Automatically sending an attachment using Apple Mail. (From: Wayne Melrose <email@hidden>)
 >Re: Automatically sending an attachment using Apple Mail. (From: "Rich Green" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.