Hello! My problem is that I can't send mail using php. Actually, it works perfectly on one host ( I do receive emails ) but when I copied the same code to another host, I didn't receive anything. This is my code...it's pretty simple...
function sendMail() {
$to = 'dummy@dummy.com';
$subject = 'subject'';
$message = 'name: '.$POST[name].'\nemail: '.$POST[email].'\ncell number: '.$POST[cell];
$headers = 'From: '.$POST[email]. '\r\n' .
'Reply-To:'.$_POST[email].'\r\n' .
'X-Mailer: PHP/' . phpversion();
$success = array($to, $subject, $message, $headers);
if ($success==TRUE) {
echo "Registration successful!";
} else {
echo "There was an error in sending your form.";
}
}
The function still returns true (I see the message "Registration successful"). But I don't receive any email...
I asked the new host about this and they said I should indicate /usr/sbin/sendmail in my script. Where do I insert that? Please help me...Thank you!