I've recently moved servers and now a piece of PHP script is no longer working properly.
I pulls a bunch of e-mail addresses from a MySQL database and then sends them all a "group" e-mail. Except it only sends the e-mails to some (almost all) of the e-mail address and then comes up with this screen:
I've checked the e-mail addresses back and forth (in this instance there's 65) and I can't see any which are the wrong format.
Here is the script:
Any ideas on what's going wrong?
Cheers
Tama
I do my sums on fingers and thumbs.
I pulls a bunch of e-mail addresses from a MySQL database and then sends them all a "group" e-mail. Except it only sends the e-mails to some (almost all) of the e-mail address and then comes up with this screen:
Code:
500 Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, admin@mydomain.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request. [/quote]
Looking in the web error logs brings up this message:
[code]"malformed header from script. Bad header=No recipient addresses found"
I've checked the e-mail addresses back and forth (in this instance there's 65) and I can't see any which are the wrong format.
Here is the script:
Code:
$to = $email; <=$email directly from MySQL database
$mailheaders = "From: $sender_name <$sender_email>\n";
$mailheaders .= "Reply-To: $sender_email\n\n";
mail($to, $subject, $msg, $mailheaders);
Any ideas on what's going wrong?
Cheers
Tama
I do my sums on fingers and thumbs.