I am trying to make my forum have the ability to send out HTML email through the control panel to my users. So I am working on the admin/email.php and the email sends great, with HTML working and all but the from address gets all discombobulated.
Here is the code I am adding
Code:
// joor added for html email
$headers = "From: $from \r\n";
$headers .= "MIME-Version: 1.0\n" . "Content-type: text/html; charset=iso-8859-1";
$sendmessage = stripslashes($sendmessage);
// end
if (!$test) {
echo "sending ... \n";
// vbmail($user['email'], $subject, $sendmessage, $from);
// joor edited for html email
vbmail($user['email'], $subject, $sendmessage, $headers);
// end
but the from email comes in looking like this
The from should just be just from
webmaster@rcfiles.com, so somewhere I have the formatting wrong of the $header string but I can't figure it out, tried every possible combination I could think ok. This layout of code works fine when I am doing it from a outside of VBB on a private mailing list of mine.