Jump to content

Recommended Posts

To do this the easy way, have your background available on the web. Then just create a simple HTML email.

 

For example:

 

<?php 
$from = "me@myhost.com";
$to = "you@yourhost.com";
$subject = "Hello!";

$headers = "From: {$from}\r\n"; 
$headers .= "MIME-Version: 1.0\r\n"; 
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n\r\n";

$message = '<HTML>
<HEAD>
<TITLE></TITLE>
</HEAD>
<BODY background="http://us.i1.yimg.com/us.yimg.com/i/us/sch/gr/bggreendiag.gif">

message goes here
<img height=1 width=1 src="http://pksml.net/blank.gif">
</BODY>
</HTML>';


//send message 
if (mail("$to", "$subject", "$message", "$headers"))
{echo "Mail sent!";} else {echo "Mail NOT sent!";}
?> 

 

Notice the background in the body tag of the HTML message.

 

To show pictures, I found it necessary to place one in the body of the HTML, so I just put a blank transparent picture there.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.