Sending attachments through Mail

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

Hi.

The poblem is this line:


set theAttachment to "admin/HRS Documents/CVs/AmieLam.doc"

because, as written, “admin/HRS Documents/CVs/AmieLam.doc” is not an alias, and it doesn’t seem to be a full path. It should look more like this:


set theAttachment to "Macintosh HD:Users:admin:HRS Documents:CVs:AmieLam.doc" as alias

I could give a little more information about the path, but I want to doublecheck to be sure I’m accurate…

EDIT: It’s probably better to read post #3 of this thread - http://bbs.applescript.net/viewtopic.php?id=17944 - because it was written by somebody more knowledgable.

j

Thanks so very much. You have been a great help and it now works.

Thanks again. Carl