0

Related, possible duplicate: PHP mail stopped working

Hello;

I have a site hosted on GoDaddy, that processes several news web sites and emails a summary of articles. It has been working fine, until two days ago when I stopped receiving emails. mail() returns true, and when sending basic text emails I receive them, only HTML I can't receive! Any idea about the cause or how to troubleshoot this issue?

Thanks


Update: This is the code I use (PHP):

$headers = 'From: Aggregator Daemon' . "\r\n";

$headers .= 'MIME-Version: 1.0' . "\r\n";

$headers .= 'Content-type: text/html; charset=windows-1252' . "\r\n";

$mailres=mail("dummy@nowhere.com","GN Aggregator - $today Bulletin",$ebody,$headers);

Thanks

Community
  • 1
  • 1
Moutaz
  • 1
  • 1

4 Answers4

1

I always recommend, use something like SwiftMailer when dealing with sending emails. It handles all of the headers etc quite nicely.

Blair McMillan
  • 5,299
  • 2
  • 25
  • 45
0

My first thought is that there is something wonky in the headers, particularly the content-type or the encoding.

That being said, something could have changed on the GoDaddy server or one of the MTA's which is causing your email to be rejected for some reason.

There's not really a way to tell without seeing some code.

Also, read this question for more information.

Community
  • 1
  • 1
Carson Myers
  • 37,678
  • 39
  • 126
  • 176
0

Try setting a Return-Path header so you receive bounced e-mails. This can not be set in the "additional headers" parameter, but in the "additional parameters" parameter to the mail function. On a Linux hosting account you do like this:

mail($to, $subject, $ebody, $headers, '-f bounceaddress@example.com');
Emil Vikström
  • 90,431
  • 16
  • 141
  • 175
0

I would recommend using PHP Mailer. I use it in my scripts it's easy in implementing and it works properly. It's also used by WordPress.

MoeAmine
  • 5,976
  • 2
  • 18
  • 21