note 46044 added to function.mail

From: Date: Tue, 28 Sep 2004 07:42:57 +0000
Subject: note 46044 added to function.mail
Groups: php.notes 
Request: Send a blank email to php-notes+get-77462@lists.php.net to get a copy of this message
Some times you may loose headers and not able to display your html email correctly. This happen to me when the underlying SMTP server was a QMail. To fix this error change the EmailNewLine to be "\n" instead of "\r\n". example: <? $message="<FONT SIZE='14' COLOR='#FF0033'><I><B>HTML EMAIL</B></I></FONT>"; //$headers = "MIME-Version: 1.0\r\n"; $headers = "MIME-Version: 1.0\n"; //$headers .= "Content-type: text/html; charset=iso-8859-15\r\n"; $headers .= "Content-type: text/html; charset=iso-8859-15\n"; //$headers .= "From: someone@someone.com\r\n"; $headers .= "From: someone@someone.com\n"; mail("user@example.com", "Html e-mail example",$message, $headers); ?> Fabio Castaneda www.redycomercio.com www.netandcommerce.com ---- Manual Page -- http://www.php.net/manual/en/function.mail.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+46044 Delete -- http://master.php.net/manage/user-notes.php?action=delete+46044&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+46044&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#77462) next »