Since 10.5 I can no longer script the sender if sending a mail via Mai

Since 10.5 I can no longer script the sender if sending a mail via Mail

I would use the following script to send mail from different mail accounts using just the one account in 10.4.

set theBody to "abc"
set theSubject to "XYZ"
set theTarget to "xxx@2.com"
tell application "Mail"
set newMessage to make new outgoing message with 
roperties {subject:theSubject, content:theBody}
tell newMessage
make new to recipient at end of to recipients with properties {address:theTarget}

set sender to "123@mail.com"

end tell
send newMessage
end tell

set sender to “123@mail.com no longer works since upgrading to 10.5. It is ignored and the name of the account it is sends from is used in its place.

Any tips as to how to fix this?

set newMessage to make new outgoing message with
properties {subject:theSubject, content:theBody}

Hi,

why do you open a new topic?

Usually the syntax of the sender is John Doe john@doe.com.
Maybe Tiger is more tolerant than Leopard

sorry and yes cwtnospam

set newMessage to make new outgoing message with 
roperties {subject:theSubject, content:theBody}

I noted after posting that the P disappeared. that is not the problem. the script works under 10.4 and under 10.5 I have the sender problem.

sorry Stefan did not want to bother folks, as it is a slightly different problem I thought rather than confusing the first one I start a new one. should I not have? Would you mind having a look at the other one and see if you can help there?


I tried both, same as you suggested and the one in my script.

could be, any work around you know of? any way of scripting it different?