Mail() Problem
Posted: Thu May 27, 2004 1:43 am
Hi all
I am writing a script that sends emails with the mail() function. All of a sudden it stopped sending. I have not changed the code at all. Here's a test version that does not work on my server.
I am renting virtual space on a server. Do you think they have suspended my mailing or something? I have asked them.
ALSO does anyone know if I am able to edit the php.ini file on a virtual server? Does every web account have its own php.ini file or is there just one for the who server?
Thanks
Larry
I am writing a script that sends emails with the mail() function. All of a sudden it stopped sending. I have not changed the code at all. Here's a test version that does not work on my server.
Code: Select all
<?php
$email = "myemail@hotmail.com";
$email_msg = "Test";
#Get email headers===
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .="From: me@mywebsite.com <me@mywebsite.com >\r\n";
#Send email====
$success=mail($email, "Welcome.", $email_msg, $headers);
If (!$success){
echo "Error Sending email. Please contact us. <BR>";
exit();
}else{
echo "email sent!<br>";
}
?>ALSO does anyone know if I am able to edit the php.ini file on a virtual server? Does every web account have its own php.ini file or is there just one for the who server?
Thanks
Larry