Jump to content

going mail() problems.


otuatail

Recommended Posts


Hi.
The code I have been using for 10 years has stopped again. I believe this is a configuration problem with my web host. The code was working up to yesterday and other parts of the website have similar code that has stopped. Is there any way I can use some sort of ini set to overcome this. I was hoping to demo a website today and now this.

I even have a test mail() with default fixed values that should also work. Here is the code complete with what was echo(d) back.

Any help would be really appreciated here. I am desperate to get this email working again.

***
/*
$emailList = "";
$qCustomers = GetCustomers($_SESSION['MySQLEmail']);
while ($row = mysql_fetch_array($qCustomers))
{
$emailList .= $row['Email'] . ",";
}
$emailList = trim($emailList, ",");
echo $_SESSION['MySQLEmail'] . "<br>";
echo "$emailList<br><br>";
*/
$emailList = "paulotuatail@aol.com,desotuatail@aol.com,otuatail@aol.com";

$site ="mysight";
$webemail = $site . "@desmond-otoole.co.uk";
$headers = "From: $site <$webemail>\r\n";
$success = mail($emailList,$subject, $msg, $headers, '-froot@desmond-otoole.co.uk'); // must comply with » RFC 2822.

echo "Success1: " . $success . "<br>List: " . $emailList . "<br>Subject: " . $subject . "<br>Site: " . $site . "<br>webemail: " . $webemail . "<br>headers: " . $headers . "<br><br>";

/* result of above echo
Success1: 1
List: paulotuatail@aol.com,desotuatail@aol.com,otuatail@aol.com
Subject: Happy christmas from everyone here at Millers Yard
Site: mysight
webemail: mysight@desmond-otoole.co.uk
headers: From: mysight
*/

// test using fixed text values This also failes ***
$success = mail("paulotuatail@aol.com,desotuatail@aol.com,otuatail@aol.com","My Subject", "My Message", "From: $site <mysight@desmond-otoole.co.uk>\r\n", '-froot@desmond-otoole.co.uk'); // must comply with » RFC 2822.


***

 

Link to comment
Share on other sites

Any error messages displayed? What do the server logs say?

 

Unless this is a development server, only change this temporarily. Open php.ini and look for display_errors = and make sure it = On and restart the web service.

 

If you're using apache you'll also want to have a look at /var/logs/apache2/error.log it maybe logging to another location all depends on the web server itself.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.