Solved

Outlook for XP (How to embed images into HTML email without absolute linking)

Posted on 2006-11-13
7
637 Views
Last Modified: 2010-05-18
I'm trying to embed some images into my HTML file so that when I setup a new template with Outlook's "Stationery Picker..." I can select the HTML file I wish to use and the images will be embeded rather than pointing to the web server to download them when the user opens the received email.

I cannot find out how to do this at all and I have scoured the internet for DAYS!

I've been trying to find out more about CID: (Content-ID) but it all seems very complicated and I can't understand (or find any information on...) how to change a absolute URL like http://www.mydomain.com/images/header.gif into a CID: url?

All other ways of embedding an image seem to require server-side code to embed the image, but I'm not sending my email from a server using server-side code but sending via the Email client (Outlook software) with a HTML file.

If anyone can help me out here as this is now starting to drive me bonkers! and the client is screaming down my neck to get a solution sorted (because currently we are pointing the images to the server absolutely - i.e. http://www.mydomain.com/images/header.gif - and the client is unhappy with having absolute pointing images as the recipients cannot view the email images without an internet connection).

Please help.

Kind regards,
Mark
0
Comment
Question by:sPuff_Programmer
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 76

Expert Comment

by:David Lee
ID: 17934076
Greetings, sPuff_Programmer.

The CID tags are created internally by Outlook.  The simplest way to embed the images is to have them in the same folder as the HTML file, which is exactly what you see with stationery.  You can then refer to the image by its name with no need for a path.  Outlook will automatically embed those images.

Cheers!
0
 

Author Comment

by:sPuff_Programmer
ID: 17936612
Hi BlueDevilFan,

Thanks for the quick response.

I've got a folder on my desktop called "Converso" (converso being the client), within this folder is another folder called "Test" and within this test folder is my HTML file and all the images.

The images in my HTML file just refer to the image names as the path is the same as the HTML file (e.g. <img src="header.gif">).

Now if I go to the Stationery Picker in Outlook and setup a new stationery with this HTML file I have the pictures do not appear when I click on "New Message"? I right click on the broken image and select "Properties" the "Picture Src" says "outbind://6/header.gif" should I change this to just "header.gif" or leave as "outbind://6/header.gif" ?

At the moment the image is broken if I leave it as "outbind://6/header.gif" but if I change the src to "header.gif" not only does the image stay broken but the size of the image shrinks down to a small square which obviously is even worse so I'm assuming I have to leave it as "outbind://6/header.gif"?

I sent the email twice to myself, once with the Picture Src left as it was "outbind://6/header.gif" and the second time I sent it I changed the Picture Src to just "header.gif".

The first email didn't embed the pictures. I viewed the source of the email and the HTML showed that the image src was still exactly like the HTML (i.e. not a CID: converted name - <img src="header.gif">).

The second email also didn't embed the pictures. I viewed the source of the email but the HTML was slightly different and showed that the image src was now <img src="file://header.gif">.

But regardless, neither way embeded the images!?

Also, in my Outlook I have a specific option selected, if you go to "Tools > Options..." then "Mail Format > Internet Format...", I have the first section "HTML options" checkbox selected (i.e. "When an HTML message contains pictures located on the Internet, send a copy of the pictures instead of the reference to their location"), will this cause problems or not?

Thanks again for your quick response, hopefully you can help me resolve this issue.

Kind regards,
Mark
0
 
LVL 76

Accepted Solution

by:
David Lee earned 500 total points
ID: 17937209
Hi, Mark.

For Outlook to embed the image it has to be able to find the image file.  Take a look at any of the HTML files in Outlook's stationery folder (C:\Program Files\Common Files\Microsoft Shared\Stationery).  You'll notice that the "src" of each image is just the file name.  If you create a message based on one of these stationery files you'll see that the image are all turned in to embeded images (i.e. prefixed with CID:).  That's because Outlook sees that the src is a filename and the image is in a folder that Outlook can see.  Outlook should also embed the image if you use a local path (e.g. C:\MyImages\Image.gif).  If the image path contains a URL (e.g. http://myserver/myimages/image.gif), then Outlook will ink to it not embed it.  An alternative approach is to follow the instructions listed on this page: http://email.about.com/cs/outlooktips/qt/et051704.htm

If you are creating stationery, then the simplest solution is to copy all the files, HTML and images, to Outlook's stationery folder.  If instead you are creating a newsletter or something along that line, then you can use local file paths.  

Does that help?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:sPuff_Programmer
ID: 17957043
Hi BlueDevilFan,

This has worked!

NOTE:
I had to make sure the images were in the same folder as the HTML otherwise it didn't work (e.g. I had created a folder called "images" within C:\Program Files\Common Files\Microsoft Shared\Stationery - and changed the image paths in the HTML to point to that sub folder - "images/header.gif").

Thank you so much.

Kind regards,
Mark
0
 
LVL 76

Expert Comment

by:David Lee
ID: 17968019
You're welcome, Mark.  I'm glad I was able to help out.  If you're satisfied with the answer, then please don't forget to close the question.
0
 

Author Comment

by:sPuff_Programmer
ID: 17977656
Sorry, stupid question, how do I close the question?

Thanks

Mark
0
 
LVL 76

Expert Comment

by:David Lee
ID: 17978694
When you view the question there should be buttons labeled "Accept" next to the various posts.  Click the button next to the post that you feel answered or contributed most to answering the question.
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Find out what you should include to make the best professional email signature for your organization.
Mailbox Overload?
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question