Hi Anyone
I have been trying to send a mail script with an attachment and it keeps failing. Could anyone help me to see what I am doing wrong.
set theAddress to “Roy.home@hrspro.co.uk”
set theCCAddress to “cc@hrspro.co.uk”
set theBccAddress to “bcc@hrspro.co.uk”
set theSubject to “Attached CVs”
set theBody to "Dear Roy
Further to our conversation regarding the candidates for the role of , please find attached the following CVs, Roy Keane.
If you have any queries, please do not hesitate to contact me.
Kind regards
Ulrika
"
set theAttachment to “admin/HRS Documents/CVs/AmieLam.doc”
tell application “Mail”
–activate
set newMessage to make new outgoing message with properties {subject:theSubject, content:theBody & return & return}
tell newMessage
set visible to true
make new to recipient at end of to recipients with properties {address:theAddress}
make new cc recipient at end of cc recipients with properties {address:theCCAddress}
make new bcc recipient at end of bcc recipients with properties {address:theBccAddress}
tell content
make new attachment with properties {file name:theAttachment} at after the last paragraph
end tell
end tell
activate
set theID to id of newMessage
end tell