Mailing Lists: Apple Mailing Lists

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

Mail.app html content with attachment



hi everyone,

i'm trying to use Mail.app to send an html formatted email, with an
attachment. How can I attach a file to the "html content"? I always
have a NSCannotCreateScriptCommandError, on the "make new attachment"
bit....

thanks a lot for every suggestion

Mauro

---

set addrVar to "email@hidden"
set subjectvar to "Test" & (current date) as string
set bodyvar to "<br><br>Test"
set file_att to choose file


tell application "Mail" set mess to (a reference to (make new outgoing message at beginning of outgoing messages)) tell mess make new to recipient at beginning of to recipients with properties {address:addrVar} set the subject to subjectvar set the html content to bodyvar tell html content make new attachment with properties {file name:file_att} at before the first word of the first paragraph end tell end tell send mess end tell _______________________________________________ Do not post admin requests to the list. They will be ignored. AppleScript-Users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/applescript-users/email@hidden Archives: http://lists.apple.com/mailman//archives/applescript-users

This email sent to 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.