Hi,
I need help on how to add email from php to an html page. I just need it to say <sendersemail@email.com> sent you this: ... just not sure how to word it to be like that.
Any help would be appreciated!
Thanks,
Reth
The code looks like this:
$random_hash = md5(date('r', time()));
//define the headers we want passed. Note that they are separated with \r\n
$headers = "From: " . $REQUEST['email'] . " \r\nReply-To: " . $REQUEST['email'];
//add boundary string and mime type specification
$headers .= "\r\nContent-Type: multipart/mixed; boundary=\"PHP-mixed-".$random_hash."\"";
//read the atachment file contents into a string,
//encode it with MIME base64,
//and split it into smaller chunks
$attachment = chunk_split(base64_encode(file_get_contents($_REQUEST['filename'])));
//define the body of the message.
ob_start(); //Turn on output buffering
?>
--PHP-mixed-<?php echo $random_hash; ?>
Content-Type: multipart/alternative; boundary="PHP-alt-<?php echo $random_hash; ?>"
--PHP-alt-<?php echo $random_hash; ?>
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
<p><a href="mailto:youremail@gmail.com" title="mailto:youremail@gmail.com blocked::mailto:youremail@gmail.com">youremail@gmail.com</a> wants you to check out:<br />