3 Replies Latest reply: Oct 24, 2008 8:24 AM by BenChase
BenChase Level 1 (10 points)
I have part of my script attaching a pdf to a mail message and sending it out. Mail "unexpectedly quits" almost after every message. Is it something wrong with my script?

heres the part where the message gets made and sent:

set subj to "Proof for " & AdName
set EmailFile to POSIX path of fileName --Mail likes UNIX file paths instead of AppleScript (/ instead of : path delimiters)
tell application "Mail"
set outMessage to make new outgoing message with properties {visible:true, subject:subj, content:"" & return & return}
tell outMessage
make new to recipient at end of to recipients with properties {address:(Email)}
tell content to make new attachment at after last paragraph with properties {file name:EmailFile}
end tell
send outMessage
end tell