Hi
I have written my code (below) and it sends the email fine but the vaiables are not being shown
eg
$headers .= 'From: "$sender_name" <"$sender_email">' . "\r\n";
When I look at the email it actually says From : $sender_name
Same in the Subject
and in the table at:
<tr><td>"$message1"</td></tr>
Not a lot of good !
Please help !
Finally - my link doesn't work
In my yahoo email it puts a link to their login page ???
I think I've done a few things wrong
Thanks for any corrections.
David
// multiple recipients
$to = $friend_email;
// subject
$subject = 'Urgent message from "$sender_name"';
// message
$message = "Hello $friend_name, this message is from $sender_name ";
$message .= "( email address:$sender_email) ";
$message .= $message1;
$message = $message.'
<html>
<head>
<title>Yodbod.com the Free Ads site</title>
</head>
<body>
<table border="0" cellspacing="0" cellpadding="1" >
<tr><td>"$message1"</td></tr>
<tr><td>
<p>
Here is a link to an advert in Yodbod.com <BR>
I think will interest you.<br>
It is in the section :$section<br>
And it has the heading: $detail<br>
<a href="www.yodbod.com">Link to Advert</a>
</p>
</td></tr>
</table>
</body>
</html>
';
// To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// Additional headers
$headers .= 'From: "$sender_name" <"$sender_email">' . "\r\n";
$headers .= 'Bcc: boss@yodbod.com' . "\r\n";
// Mail it
mail($to, $subject, $message, $headers);