Link to home
Start Free TrialLog in
Avatar of Éric Moreau
Éric MoreauFlag for Canada

asked on

Background image in e-mail

I am creating an HTML e-mail that I am sending using vbSendMail (http://www.freevbcode.com/ShowCode.Asp?ID=109).

The body I am sending is something like:
<html>
<head><title>My Title</title></head>
<body bgcolor="#FFFFFF" bgproperties="fixed">
<table border="0" width="900" background="c:\Rquant.jpg" height="328" bgcolor="#FFFFFF">
  <tr>
    <td width="100%" valign="top" height="324">&nbsp;
      <p>&nbsp;</p>
      <p><font size="5">Hi, </font></p>
      <p><font size="5">This is my message.</font></p>
      <p>&nbsp;</p>
    </td>
  </tr>
</table> </body> </html>

I now need to add a background image to this e-mail (the corporate logo). So I have added the BACKGROUND tag to my e-mail template and the path is somewhere on the server (redirected to c:\ for my test).

The problem occurs when I send this e-mail to someone that doesn't have access to the server, the background is not available.

How can I embed (instead of link) the background into my e-mail.

Avatar of Richie_Simonetti
Richie_Simonetti
Flag of Argentina image

What i found is a jpg image attached with base64 encoding:
This is an extract of one mail with background image

<BODY bgColor=3D#ffffff =
background=3Dcid:008101c248bf$73cd8f40$25682ac8@b5x4u4>

------=_NextPart_000_0082_01C248A6.4E805740
Content-Type: image/jpeg;
     name="Silver_Fold.jpg"
Content-Transfer-Encoding: base64
Content-ID: <008101c248bf$73cd8f40$25682ac8@b5x4u4>

/9j/4AAQSkZJRgABAgAAZABkAAD/7AARRHVja3kAAQAEAAAANwAA/+4AIUFkb2JlAGTAAAAAAQMA
EAMDBgkAAAKZAAAC/gAABkz/2wCEAAcFBQUFBQcFBQcKBwYHCgwJBwcJDA4LCwwLCw4RDAwMDAwM
EQ4QEREREA4VFRcXFRUfHh4eHyMjIyMjIyMjIyMBCAgIDg0OGxISGx4XFBceIyMjIyMjIyMjIyMj
IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjI//CABEIALIANAMBEQACEQEDEQH/
xACnAAEBAQEBAAAAAAAAAAAAAAABAAIDCAEBAQEAAAAAAAAAAAAAAA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jmzULCgBs8wEAVLjH4jEKN
UiGvxCjHIZi5n+DfMJJJuiHZ9YCTZsuLrniAKQcA2RfeBK1Q9/KOw2VGvOAyA0G0dD0nDDwujgY4
Bn5+IDKG9f5CnbZ2xqMyrArmh8TQDR40+0AAhVseUZ9TT33xHnwoS/gSygdDAcBAXgekJJ/uAprI
6N66zHO0+nMI24C5dpZWlmDPaDA60oSzPRwM9te8IDdeFAQKhIF6BxglYOcdYKHDm8V5xRbrZ/EJ
LB6Dqs7gZEk6Q/NVEL68jwZoMLNfHzCSQDo5Bwokw5Xm3AWKHFI8HtCqNjwPiFBO9+2ZYACoEgV1
zGNgjwIXVRJ2/wAR295fllOFNN5NXxuElCgWxhJFOhReMvEIt5CzmEkiWLBaMRAO3joRFsDyqXMY
Jpj+e0oECCOnjpCEXrPeVvrcJQK7tbdQHAdr+5w/sQFbXUesa9LuArv2hYbpURGcju+sOR16RcIh
oekwFsxLXaFjnPSOjgvKgN15yktvN+ksDrnEBeftCQ68/wCIAsjVQlpjqe0LA/m5/hvKzLAHGzqi
+ZxF78nEDs9+3tAQSGh5+KgXZohRycekRJHuqjd05PaE2sir1nrCPK7PMSGzRI+ITAHKOxntGCaq
lpU6zCsYVoO449ooK2KJH4uW4ktj1j8AaahYAkEYQCWHiDY8zfvLNX6Y9eekHZ5517TD8mPHM2x/
qMuz3BB4fRuHBzg4jyfOZ//Z

------=_NextPart_000_0082_01C248A6.4E805740--

There are several base64 code/decode code at freevbcode (no pun intented). Maybe  this could be a start.
Cheers
Avatar of Éric Moreau

ASKER

I already have my image UUEncoded in a text file if I need it but I did some text and I have problems with the NextPart_000_ ... I know that the digits that are following reprents date and time but can I simply replace it with random numbers? Can I copy this section directly after the </html>?
ASKER CERTIFIED SOLUTION
Avatar of Richie_Simonetti
Richie_Simonetti
Flag of Argentina image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I found something. Not exactly what I wanted but it is working.

I first attach the image to my message (using the Attachment property) and I set my background tag to "cid:rquant.jpg" .
You put me on the right track with cid keyword. Thanks.
Glad to help YOU.
thanks for "A" grade.