Forum Moderators: coopster
i am not a great fan of sending email from site/form. Yet a client of mine insisted in getting some reports, so i have to make some script that do that, send html email to him.
I was clueless to that, so i start reading articles, tutorials and manuals. Some time later the job was done.
Now the question : in almost all reading material I have seen the $headers attribute being used. While in my case it only works as $header attribute (when i use it as $headers, it wont work, either error message or send plain text mail with the html code in it).
Why this is happening? The server the application is hosted runs apache 1.3 and php 4.3. Any suggestions?
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'To: Mary <mary@example.com>, Kelly <kelly@example.com>' . "\r\n";
$headers .= 'From: Birthday Reminder <birthday@example.com>' . "\r\n";
$headers .= 'Cc: birthdayarchive@example.com' . "\r\n";
$headers .= 'Bcc: birthdaycheck@example.com' . "\r\n";
Which most tutorials also use..
In my case, if i use $headers, it just dont work (send text email with html code in body of text). I must use it as $header in order for mail to work.