Re: Mail slow creating html message
Re: Mail slow creating html message
- Subject: Re: Mail slow creating html message
- From: Shane Stanley <email@hidden>
- Date: Wed, 04 Dec 2013 22:27:54 +1100
On 2 Dec 2013, at 5:16 PM, Christopher Stone <email@hidden> wrote:
If memory serves there's no way to make the window visible before sending if you want to send HTML mail. I wouldn't say no way. Put this in an ASObjC-based library. It also requires that styled email is turned on manually for some reason.
on doIt() set theSource to "<html><body><H1>It can be done</H1><hr><p><a href="" href="http://www.macosxautomation.com/applescript/apps/\">http://www.macosxautomation.com/applescript/apps/\">Good stuff here</a></body></html>" set theSource to current application's NSString's stringWithString:theSource set theData to theSource's dataUsingEncoding:(current application's NSUTF8StringEncoding) set theStyledText to current application's NSAttributedString's alloc()'s initWithHTML:theData documentAttributes:(missing value) set mailShare to current application's NSSharingService's sharingServiceNamed:(current application's NSSharingServiceNameComposeEmail) mailShare's setSubject:"I wish" mailShare's performWithItems:{theStyledText} end doIt
You can also include attachments.
Now what you can then do with the resulting email by script, I really don't know... |
_______________________________________________
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/archives/applescript-users
This email sent to email@hidden