Page 1 of 1

html mail not displaying correctly

Posted: Thu Sep 27, 2007 11:11 am
by shivam0101
I am storing templates in database table, when a mail has to be sent that template will be fetched and replaced and sent. The template are created by using fckeditor. When i send mail, i am getting the mails in HTML like,



<table>
<tr><td>MYname</td></tr>

</table>

Posted: Thu Sep 27, 2007 11:21 am
by feyd
Content-type not/improperly set?

Posted: Thu Sep 27, 2007 11:29 am
by shivam0101

Code: Select all

$headers='MIME-Version: 1.0\r\n';
$headers.='Content-type: text/html; charset=iso-8859-1\r\n';

Posted: Thu Sep 27, 2007 11:31 am
by feyd
Yep, improperly set, I believe.

In single quote strings \r and \n (among others) are not parsed as carriage-return/line-feed metacharacters, but literally as are.

Posted: Fri Sep 28, 2007 7:13 am
by shivam0101
Thanks. It got solved after i put double quotes.