Éric Moreau
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">
<p> </p>
<p><font size="5">Hi, </font></p>
<p><font size="5">This is my message.</font></p>
<p> </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.
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"
<tr>
<td width="100%" valign="top" height="324">
<p> </p>
<p><font size="5">Hi, </font></p>
<p><font size="5">This is my message.</font></p>
<p> </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.
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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" .
I first attach the image to my message (using the Attachment property) and I set my background tag to "cid:rquant.jpg" .
ASKER
You put me on the right track with cid keyword. Thanks.
Glad to help YOU.
thanks for "A" grade.
thanks for "A" grade.
This is an extract of one mail with background image
<BODY bgColor=3D#ffffff =
background=3Dcid:008101c24
------=_NextPart_000_0082_
Content-Type: image/jpeg;
name="Silver_Fold.jpg"
Content-Transfer-Encoding:
Content-ID: <008101c248bf$73cd8f40$256
/9j/4AAQSkZJRgABAgAAZABkAA
EAMDBgkAAAKZAAAC/gAABkz/2w
EQ4QEREREA4VFRcXFRUfHh4eHy
IyMjIyMjIyMjIyMjIyMjIyMjIy
xACnAAEBAQEBAAAAAAAAAAAAAA
AAAAAAAAAREQICExQRIwcAJCEQ
AAAAAAAAAAAAAAAAAHATAAICAg
DAMBAAIRAxEAAAD0KoKyQCvJNV
ORDQMBAhawBWoFxSSREsmVDQBW
1FZhaGqIiMxUEJlJcoLozIkrWU
AQUBLXwUutspS5uKVzNmiiKUTG
ysp6OcI3OuhiWj1qmm6binZvfR
PwEh/9oACAEBAQY/AX/R7pFkmq
rbgGqySWJlNsfSUYZJOiXwe93L
h+q/fH7D+0fr/9oACAEDAwE/EP
5hL99hIMaxBYGygcl12hcMCxZO
R4gIVRZ4/qN0094EwPIGEMGkLx
soWO8INnfVx6cLPLVKoQfUjnI5
YMsnAINgjHSEjwarXaAaKk14+Y
UiGvxCjHIZi5n+DfMJJJuiHZ9Y
Bn5+IDKG9f5CnbZ2xqMyrArmh8
6N66zHO0+nMI24C5dpZWlmDPaD
LB6Dqs7gZEk6Q/NVEL68jwZoML
zGNgjwIXVRJ2/wAR295fllOFNN
Jpj+e0oECCOnjpCEXrPeVvrcJQ
oekwFsxLXaFjnPSOjgvKgN15yk
+ZxF78nEDs9+3tAQSGh5+KgXZo
lpU6zCsYVoO449ooK2KJH4uW4k
qMuz3BB4fRuHBzg4jyfOZ//Z
------=_NextPart_000_0082_
There are several base64 code/decode code at freevbcode (no pun intented). Maybe this could be a start.
Cheers