hi all,
i am trying to read a file from a popup dialog, then use the file input as fields of my mail. it's almost done.
Except i'd like to have it write the message body/contents exactly as i entered it (indentations at least), and inserting the subject also in between the body OR copying from RTF file, then dump the formatted text into the message contents OR using email signatures. I have accepted the fact that Mail's Applescript doesn't let me format my text (font,size,justification). I am trying to send mail to prospective employers so i'd like my mail to look better than an email virus.
I'm thinking of using email signatures tomorrow, but other suggestions are welcome.
part of the code:
what i at least expect to have is:
i am trying to read a file from a popup dialog, then use the file input as fields of my mail. it's almost done.
Except i'd like to have it write the message body/contents exactly as i entered it (indentations at least), and inserting the subject also in between the body OR copying from RTF file, then dump the formatted text into the message contents OR using email signatures. I have accepted the fact that Mail's Applescript doesn't let me format my text (font,size,justification). I am trying to send mail to prospective employers so i'd like my mail to look better than an email virus.
I'm thinking of using email signatures tomorrow, but other suggestions are welcome.
part of the code:
Code:
tell application "Mail"
try
set theEmailSubject to last word of (item i of Names)
set theEmailBody to "To whom it may concern, I have come across your job posting, " & theEmailSubject & ", and I am interested to apply for the post." as string
set theEmailAddress to word 2 of (item i of Names) & "@" & word 3 of (item i of Names) as string
set theAttachment to alias "Macintosh HD:Users:blablabla:Documents:MyCV.doc"
set theMessage to make new outgoing message with properties {visible:true, subject:(theEmailSubject), content:(theEmailBody)}
tell theMessage
make new to recipient at end of to recipients with properties {name:(word 1 of (item i of Names)), address:(theEmailAddress)}
make new attachment with properties {file name:theAttachment} at after the last word of the last paragraph
end tell
end try
end tell
what i at least expect to have is:
Code:
To whom it may concern:
I have come across your job posting, " & theEmailSubject & ",
and I am interested to apply for the post. I have nnn years of experince and
I'm ready to join ASAP if ever shortlisted for the position.
Attached is my CV for your reference.
Hoping for your kind consideration.
Regards,
Fernando