This is what I do. I have the send command within
the tell statement for the message.
tell application
"Mail" set newMessage to make new outgoing message with
properties {subject:theSubject, content:theContent} tell
newMessage set countrecipients to number of items in
EMailAddressList repeat with c from 1 to
countrecipients make new to recipient at end of to
recipients with properties {address:(item c of
EMailAddressList)} end repeat set
sender to "email@hidden" send end
tell
---------------
Karen Nielsen
schmidt
print solutions that
deliver
ph | 507.775.7308
fx |
507.775.6655
FSC
Certified Printer
Applescript
returns the same message.
I
followed your advice and ran the corrected script with send a_message as a
command of the Mail app, rather than as a command of the outgoing message.
The
events and replies pane of the applescript window returned the following:
tell
application "Mail"
get last item of every outgoing message
-->
outgoing message id 39
make new to
recipient at beginning
of every to recipient
of outgoing message id 39 with
properties { address:"Foo Goo < email@hidden>", « class rdsn»:"FirstName LastName"}
-->
«class of outgoing message id 39
send
outgoing message id 39
-->
error number -1708
Result:
error
"Mail got an error: outgoing message id 39 doesnt understand the send message."
number -1708 from outgoing
message id 39
It
appears that the same error is generated. I am perplexed.
On Jan 26, 2010, at 12:36 PM, Michelle Steiner wrote:
tell application "Mail"
set a_message to item -1 of ((every outgoing message))
tell a_message
make new to recipient at beginning of to
recipients ¬
with properties { address:" Foo Goo < foo.goo@gmail.com>", « class rdsn»:"FirstName
LastName"}
end tell
send a_message
end tell
|