Jump to content

[SOLVED] mail() and mime


Jabop

Recommended Posts

<?php
$Header='From: [email protected]' . "\r\n";
$Header.='MIME-Version: 1.0' . "\r\n";
$Header.='Content-type: text/html; charset=iso-8859-1' . "\r\n";

mail("[email protected]", $Title, $TPL->get(), $Header);
?>

 

I don't understand what I'm doing wrong here, haha. I am successfully setting the mimetype for a simple html email. All it has is a table and a few rows. $Header actually gets sent to the body of the email, except for the From: section of $Header.

 

Any ideas?

Link to comment
https://forums.phpfreaks.com/topic/112417-solved-mail-and-mime/
Share on other sites

<?php
$Header='From: [email protected]' . "\n";
$Header.='MIME-Version: 1.0' . "\n";
$Header.='Content-type: text/html; charset=iso-8859-1' . "\n";

mail("[email protected]", $Title, $TPL->get(), $Header);
?>

 

This fixed it. If you're using the most recent postfix packages you must use just \n instead of \r\n

Link to comment
https://forums.phpfreaks.com/topic/112417-solved-mail-and-mime/#findComment-577130
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.