email - How to use applescript to tell Mail to keep a copy of sent message -


i use applescript , can send messages without problem, "sent" box not copy of sent. however, if use mail application send messages, "sent" box gets copy of sent. guess applescript may miss command or tell mail keep copy of sent messages. what's command missed? thanks.

tell application "mail"                                                              set thenewmessage make new outgoing message properties {subject:thesubject, content:thebody & return & return, visible:true}                            tell thenewmessage                                                                   set visibile false                                                            set sender thesender                                                          make new recipient @ end of recipients properties {address:theaddress}                                                                              make new attachment properties {file name:theattachment} @ after last paragraph                                                                       send                                                                             delay 5                                                                      end tell                                                                     end tell    

i don’t think you’re missing command. copied script script editor on imac, set values thesubject, thebody, theaddress, thesender, , theattachment, , ran it. (a) sent message, , (b) able view message sent in sent mailbox.

i tried both known sender , random example.com sender. in both cases, saved in default sent box.

so issue lies elsewhere. make sure value you’re using thesender maps account in mail saves sent messages. (if it’s imap account, may saving sent messages on server, , server behavior may affecting see.)

if doesn’t work, set test values of variables in script except theaddress (using example.com thesender), , include (except theaddress) in question. (if can use example.com theaddress, too, that, servers refuse message immediately, makes worthless testing particular case.)

note have error not change behavior; have “visible” misspelled “visibile”. however, tried both ways , in both cases outgoing message stored in appropriate sent box.


Comments

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -