PHP Headers
Posted: Tue Mar 17, 2009 10:31 am
Hi,
I am trying to prepare the headrs for an email to be sent by the mail function. I want the 'from' field to be determined by user input and therefore a variable. So I am trying this with:
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'From: ' .$email. "\r\n";
However this does not work, the email does not send.
Any ideas what I am doing wrong?
Thanks in advance....
Rob.
I am trying to prepare the headrs for an email to be sent by the mail function. I want the 'from' field to be determined by user input and therefore a variable. So I am trying this with:
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'From: ' .$email. "\r\n";
However this does not work, the email does not send.
Any ideas what I am doing wrong?
Thanks in advance....
Rob.