email - Edit the subject of a forwarded message using Applescript - encountering error when editing subject line -


i have been trying write applescript forward message , edit subject. working on forwarding , populating of recipient , subject line.

when run gives me error:

"mail got error: can't set subject of item any."

here code:

tell application "mail"     set theselection selection     set theforwardedmessage forward (item 1 of theselection) opening window     tell theforwardedmessage         make new recipient properties {address:"address@blahblah.com"}         set subject "blahblahblah"     end tell end tell 

i can't figure out why it's telling me can't edit subject line. pointers?

i hope little bit, don't understand script , question.

set recipientname "zwekkerboy" set recipientaddress "john@doe.com" set thesubject "subject here" set thecontent "content"  --mail tell block tell application "mail"  --create message set themessage make new outgoing message properties {subject:thesubject, content:thecontent, visible:true}      --set recipient tell themessage         make new recipient properties {name:recipientname, address:recipientaddress}      --send message     send  end tell end tell 

-- credit maker!

you can change the

set thesubject "subject here" 

line

to

set thesubject subject -- that's "blahblahblah" 

Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -