archivist08
IS-IT--Management
My old website used PHP mail to e-mail contents of the filled form... it worked perfectly until I moved to the new host. Since then, although script reports that mail function was completed sucessfully, I don't receive the e-mail. I think my code is ok, here's the header and mail section of it:
$headers = "From: $email\r\n";
$headers .= "Reply-To: $email\r\n";
$headers .= "Return-Path: $email\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
mail($to,$subject,$message,$headers)
I e-mailed the technical support and this is what they have told me:
This function will not work if it uses a system call to the mail function, you will have to send email another way. Unfortunately we do not provide script debugging support so I can not help you write the mail script.
Since I'm not that experienced with PHP and mail function, what that this mean? Is there no way to use PHP mail? And if not, what is a good alternative? I was trying to make cgiemail work for a while, but that didn't work that well either.
Note that executing phpinfo() on my new host tells me that sendmail_path is /usr/sbin/sendmail -t -i, and again, since I'm a new at PHP, it doesn't tell me very much.
$headers = "From: $email\r\n";
$headers .= "Reply-To: $email\r\n";
$headers .= "Return-Path: $email\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
mail($to,$subject,$message,$headers)
I e-mailed the technical support and this is what they have told me:
This function will not work if it uses a system call to the mail function, you will have to send email another way. Unfortunately we do not provide script debugging support so I can not help you write the mail script.
Since I'm not that experienced with PHP and mail function, what that this mean? Is there no way to use PHP mail? And if not, what is a good alternative? I was trying to make cgiemail work for a while, but that didn't work that well either.
Note that executing phpinfo() on my new host tells me that sendmail_path is /usr/sbin/sendmail -t -i, and again, since I'm a new at PHP, it doesn't tell me very much.