|
Posted by noodles on 01/23/06 16:36
<SNIP>
>
> So - do you have a pointer for me. I would rather write the code myself
> it cant be that hard !!
>>
If you've sucessuflly sent an HTML message just use the HTML img tages to
insert the image, as you would with a webpage. See below for a snippet of
code taken from http://uk2.php.net/mail that should help.
<?php
@set_time_limit(0);
require_once 'smtp_mail.php';
$to = "expertphp@yahoo.com";
$from = "from@myaccount.com";
$subject = "Subject here";
$headers = "MIME-Version: 1.0\r\n".
"Content-type: text/html; charset=iso-8859-1\r\n".
"From: \"My Name\" <".$from.">\r\n".
"To: \"Client\" <".$to.">\r\n".
"Date: ".date("r")."\r\n".
"Subject: ".$subject."\r\n";
$message = "
<html>
<body>
<b>html message</b><br>
<font color=\"red\">here</font>
<img src=\"http://static.php.net/www.php.net/images/php.gif\"
border=\"0\" alt=\"\">
</body>
</html>
";
$response = smtp_mail($to, $subject, $message, $from, $headers);
if($response[0]) echo "The message has been sent !<br />\n".$response[1];
else echo "The message can not been sent !<br />\n".$response[1];
?>
Navigation:
[Reply to this message]
|