Re: Send outgoing message error from Mail.app
Re: Send outgoing message error from Mail.app
- Subject: Re: Send outgoing message error from Mail.app
- From: Alan Kimelman <email@hidden>
- Date: Fri, 29 Jan 2010 00:07:33 -0800
The reason for my attempt to send an email in this fashion was to email the contents of a tab of a window in Safari to a specific email address. The script that generated the problem was:
tell application "Safari" to email contents of (get current tab of window 1)
tell application "Mail" set a_message to item -1 of ((every outgoing message)) tell a_message to make new to recipient at beginning of to recipients ¬
send a_message end tell
Safari, via Applescript, generated an outgoing message in Mail. It was with the outgoing message in Mail that prompted me to question how to send an outgoing message. I found that the outgoing message generated by Safari could not be identified by Mail in order to send. I still cannot comprehend how to complete this script. Thanks for your help.
On Jan 28, 2010, at 9:55 AM, Michelle Steiner wrote: On Jan 27, 2010, at 9:58 PM, Alan Kimelman wrote: Mail. app creates an outgoing message. The outgoing message does not end in the Drafts mailbox on my Mac immediately, although it does show up after an unclear interval of time in the Drafts mailbox. I am running Os 10.6.2.
As the display of this message in the Drafts mailbox is not predictable in regard to the interval of time, I wonder whether you have any recommendations for executing an Applescript that is not prone to failure, absent a long delay interval?
Until an outgoing message is saved in the drafts folder, it has no ID, and is therefore not available to AppleScript. By pressing Command-S, you can save the current version of a message to the drafts mailbox.
But since the message is being created manually, why is there a need to send it by using an Applescript?
Maybe this snippet will help:
tell application "Mail" tell message viewer 1 set msgID to message id of messages of drafts mailbox set Iden to id of message of drafts mailbox end tell end tell
-- Michelle
-- If you ever get the urge to run naked in public, drink some Windex. It will keep you from streaking.
|
_______________________________________________
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