Your problem are our challenges

php mail mine html attachment

Send an HTML email with attachment from php

August 3, 2011 — Anonymous

PHP script to send email

<?php

$htmlbody = "This is an html message";
$textmessage = "This is a plain text message";

//Set Recipient Address
$to = "recipient@domain.com";

//Set Email Subject
$subject = "HTML email with attachment";

//define the from \ reply to headers
$headers = "From: yourname@domain.com\r\nReply-To: yourname@domain.com";

//create a unique boundary string to delimit different parts of the email (plain text, html, file attachment)
$random_hash = md5(date('r', time()));

//add boundary string and mime type specification