views:

10463

answers:

4

Is it possible to create an HTML email signature for Outlook 2003 or above that doesn't reference external images?

That is, using those special "cid" reference but embed the image itself in the signature and not on the file system or network.

This is for an web application that generates a "standard" email signature based on various input from a user. It has worked fine so far with a single "embedded" image. But a new feature is going to require the possible addition of multiple tiny images.

Getting to user to save one email signature template and one image to the user's machine is about the limit of what I'd like to require of the user. But forcing the user to save multiple images seem to be pushing things a little to far in my opinion.

So my problem is trying to embed the images into without having to inconvenience the user with multiple downloads first.

A: 

If the image is small enough, then you might be able to do something with a data URI.

Glomek
Unfortunately that doesn't seem to be compatible with the munted version of the IE renderer in Outlook mail. It doesn't even implement a half-decent CSS engine.
BlackMael
+2  A: 

If you reference the image using a file:/// URI Outlook will automatically change it into a cid: URI and add the image as an attachment on insertion.

BTW: What has this got to do with programming?

EDIT: OK, considering your update to the question: I'm afraid this isn't possible. It's not a limitation specific to signatures or Outlook though. It's just the way HTML works. If you want images inside an HTML document these will have to be separate. No way around that without proprietary formats, none of which Outlook would accept as a signature.

However, if this is for an intranet application you can get away with placing the images on a network share and referencing via UNC, e.g.

<img src="file://///ServerName/ShareName/FileName.png" />
Oliver Giesen
It still seems like I need to have the image as a physical file on the the client machine.
BlackMael
Yes. Where would you want to store it instead?BTW: It does not necessarily have to be on the client machine. A UNC-path to a file on a network share works as well.
Oliver Giesen
To clarify: What I meant was a path like: file://///ServerName/ShareName/FileName.png
Oliver Giesen
Oh! I like that idea. Store the files on a network share. I think we have a winner :)
BlackMael
Works great! Thank you
BlackMael
A: 

thank you !!!!!!!!!!!!!!!!!

George
+1  A: 

Is it possible to base64 encode the image?

<a href="http://www.britblog.com/"&gt;&lt;img

src="data:image/gif;base64,R0lGODlhUAAPAKIAAAsLav///88PD9WqsYmApmZmZtZfYmdakyH5BAQUAP8ALAAAAABQAA8AAAPb WLrc/jDKSVe4OOvNu/9gqA /..../NcV9/j5+g4JADs= " alt="Signature" width="80" height="15" />

Just a thought

Adam Patterson