PDA

Click to See Complete Forum and Search --> : One issue with creating an HTML-based email


deadseasquirrels
Aug 13th, 2005, 10:57 AM
So right now I am sending out emails using a distribution list in excel. I do a:
Set oMessage = CreateObject("CDO.Message")
to create my mail message and because it is an HTML message I do:

oMessage.HTMLBody = [html source]

The Html source I am using was something that was created in an MSOffice AP, probably Word, and then just saved as an HTML file. So I am rote copying the source, but there is one line in there that defines this logo at the top of the page:

src="cid:image001.jpg@01C599D2.BB409180"
and I have no idea what that is suppose to be referring to, but I know it gives me a deadlink. If I use some weblink to a graphics it works, so everything about this email is fine, except for that. Does anybody know what that is, and how I can get that logo back in my email. Thank you.

RobDog888
Aug 15th, 2005, 12:03 AM
Its a link referring to an embedded image more then likely. You could do like most mailings, use a link to your images on your webserver. ;)
src="http://www.something.com/images/image001.jpg"

deadseasquirrels
Aug 15th, 2005, 07:23 AM
I'll definitely consider doing that, but if I wanted to create an email message of HTML type, is there a way a can link to an embedded image, and also add that embedded image onto my message object? Or is that just not possible (or not possible without jumping through some pretty gnarly hoops)?

RobDog888
Aug 15th, 2005, 08:56 AM
I have an example in CodeBank on embedding an image into an email but its using the OOM. You would just need to convert it to CDO if you need it.

Embedd Image (http://www.vbforums.com/showthread.php?t=278600)

deadseasquirrels
Aug 16th, 2005, 01:53 PM
RobDog thanks it worked. I attached the .jpg from a local directory and then I changed the src:"cid:[jpg name]" and it worked, but it is weird like you said. When it is in my outlook mailbox the mail message looks like it has an attachment, and by that I mean it has a paper clip next to it, but then once I open it, the paper clip goes away and it's as if the graphics is a straight up embedded image.

I don't think I'm going to mess with it much more, but if anybody knows what that is, and if there is a way to get rid of that paper clip, please let me know.

deadseasquirrels
Aug 17th, 2005, 03:57 PM
Just in case anybody cares...like I said above, this addition as noted by robdog did work, even though it had that weird bug I described, but it only works with the windows client. If I checked my email from say hotmail (the web client) then the link is just dead. I guess it can't parse the HTML code correctly. It may be better to just stick with a webserver graphics link, but at least this is an option. Thanks.

RobDog888
Aug 17th, 2005, 05:34 PM
I'm back. Been busy. There are 3 types of attachments - ByRef, ByPosition, and embedded. If the attachment is embedded it is still considered an "attachment" by Outlook. Hotmail and other ISPs may do things differently sice theirs is proprietary. ;) Outlooks is by design and is not a bug, just so you dont spend any time trying to remove th epaperclip. ;)

deadseasquirrels
Aug 18th, 2005, 07:03 AM
So you're saying outlook is designed to show the paperclip and then make it disappear? I wonder why they wanted to show the paper clip at all, even if just for one time. My other question is if there was a way to choose what type of attachment you want to make? And what type of attachment am I making right now?