Sending attachment with Entourage

I have a very simple script to be able to be able to drop a file on a droplet on my desktop and send the file (usually an image) as an attachment.


on open addAttach
	tell application "Microsoft Entourage"
		make new outgoing message with properties {subject:"", content:"", attachment:addAttach}
		set msgID to result
		activate
		open msgID
	end tell
end open

This works fine, but if I add “has html:true” in the properties area of outgoing message, Entourage generates a duplicate attachment (“image.jpg”) and sends two attachments, not just one. Why is this happening? And, what can I do to send html emails and not have Entourage generate a duplicate attachment?

As I have looked at this, if I manually add an attachment to an html message in Entourage, it adds it as an attachment only, and places it under a horizontal rule – exactly the way I would like it to behave with AS. If I drag the photo into the body of the email, Entourage creates a file called “image.jpg” (or .png) which is sent as an attachment (but isn’t listed in the attachment window), and displays in the body of the email.

So… when I add an attachment via AS, with a property of has html:true, then I get both the image.jpg and the attachment added to the bottom of the email. If I specify has html:false, Entourage doesn’t attach the image.jpg to the email but instead there is a question mark in its place. I’d really like to figure out how to add an attachment to an html email without the additional image.jpg being added to the email, essentially doubling the size of the email. It’s able to do it manually… there must be a way to script it!

What if you add in your HTML message the path to the image to attach? Maybe it could work?!?

You can give an URL to the file using file:// followed by the whole path to the server or hard disk, and use a (i think) tag to embed it in the message as HTML…

Worth the try.

I am also having this problem, has anyone been able to solve this. I’ve searched through the docs that Microsoft provides, and I continue to get the duplicate file attachment when the message is sent.

As noted above, adding the “has html:true” element to the properties list is the source of the problem, but I need to allow rich text as well as only add one attachment.