Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solved: 1 Year, 1 Week ago Activation emails not sent unless headers parameter to mail() function commented out
#1
Solved: 1 Year, 1 Week ago
Hello,

A group of us have set up a new MyBB 1.8.12 forum here: http://psiencequest.net/forums/

During testing, we found that activation emails weren't being sent. I tried to debug this, and despite my best efforts, the only way I could get these emails to send was by commenting out the "headers" and "additional parameters" arguments to the mail() function in inc/mailhandlers/php.php:

                        $sent = mail($this->to, $this->subject, $this->message/*, trim($this->headers), $this->additional_parameters*/);

Has anybody else had this problem? Does anyone know how to solve it? I mean, emails are now functional, but I worry about the unintended consequences of not having these headers set.

Additional info: my web hosting provider is Hostgator. I am on a shared server.

Any and all help gratefully accepted.

Laird

Sorry, I've realised I wasn't clear:

There was never any error with sending the emails. The only problem is that they were never received.
Reply
#2
Solved: 1 Year, 1 Week ago
I set this problem aside and just got back to it. I think what was going on is that we had set our admin email to a Gmail account, and some recipient mail servers (especially Gmail servers) wouldn't accept that as a valid "From" header for the default mail server from which our host (Hostgator) sends mail using the PHP mail() function.

I've now set our admin email address to a mailbox at our actual domain and everything's working fine now - have been able to remove the commented-out parameters.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)