Mail.app html content with attachment
Mail.app html content with attachment
- Subject: Mail.app html content with attachment
- From: ishmael <email@hidden>
- Date: Wed, 15 Nov 2006 13:10:33 +0100
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:
Archives: http://lists.apple.com/mailman//archives/applescript-users
This email sent to email@hidden