MyBB Community Forums

Full Version: Email Not Working
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

I have been trying to setup the mail system on my forum, but it always gives me errors like this when I try to use PHP mail
Quote:"MyBB was unable to send the email using the PHP mail() function."
and this when I try to use SMTP mail
Quote:"Unable to connect to the mail server with the given details. Reason: 110: Connection timed out"

You can access my site at http://openmarketforums.co.uk and I will provide a test acount to a reliable user.
try this first and let us know the result .. http://docs.mybb.com/Help-Mail.html
(2014-07-04, 02:32 AM)mmadhankumar Wrote: [ -> ]try this first and let us know the result .. http://docs.mybb.com/Help-Mail.html

I just did what it said and it sent the test email to me, but I don't know if it solved the system email problem.
Can you, or someone, go on and do a quick registration to see if it works? I don't know how else to test it out, so sorry if there is a better way.
(2014-07-04, 03:31 AM)MI-6 Wrote: [ -> ]I just did what it said and it sent the test email to me, but I don't know if it solved the system email problem.

no it didnt solve the problem but it just confirmed that the default mail system is working...

1. goto inc/mailhandlers/php.php and remove the mailheaders part and check if that helps...

i mean to find this...

		if(ini_get('safe_mode') == 1 || strtolower(ini_get('safe_mode')) == 'on')
		{
			$sent = @mail($this->to, $this->subject, $this->message, trim($this->headers));
		}
		else
		{
			$sent = @mail($this->to, $this->subject, $this->message, trim($this->headers), $this->additional_parameters);
		}

and change it as

		if(ini_get('safe_mode') == 1 || strtolower(ini_get('safe_mode')) == 'on')
		{
			$sent = @mail($this->to, $this->subject, $this->message);
		}
		else
		{
			$sent = @mail($this->to, $this->subject, $this->message, $this->additional_parameters);
		}



2. Make sure that your host allows mails to be sent from/to non-domain email addresses (like [email protected]). i say this because few hosts require either the from or to address should be on the same domain as the forums.
(2014-07-04, 06:16 AM)mmadhankumar Wrote: [ -> ]
(2014-07-04, 03:31 AM)MI-6 Wrote: [ -> ]I just did what it said and it sent the test email to me, but I don't know if it solved the system email problem.

no it didnt solve the problem but it just confirmed that the default mail system is working...

1. goto inc/mailhandlers/php.php and remove the mailheaders part and check if that helps...

i mean to find this...

		if(ini_get('safe_mode') == 1 || strtolower(ini_get('safe_mode')) == 'on')
		{
			$sent = @mail($this->to, $this->subject, $this->message, trim($this->headers));
		}
		else
		{
			$sent = @mail($this->to, $this->subject, $this->message, trim($this->headers), $this->additional_parameters);
		}

and change it as

		if(ini_get('safe_mode') == 1 || strtolower(ini_get('safe_mode')) == 'on')
		{
			$sent = @mail($this->to, $this->subject, $this->message);
		}
		else
		{
			$sent = @mail($this->to, $this->subject, $this->message, $this->additional_parameters);
		}



2. Make sure that your host allows mails to be sent from/to non-domain email addresses (like [email protected]). i say this because few hosts require either the from or to address should be on the same domain as the forums.

Okay, I just did the edit that you said. How would I find out about the second part though?
(2014-07-04, 06:37 AM)MI-6 Wrote: [ -> ]Okay, I just did the edit that you said. How would I find out about the second part though?

please check if the mail is working after making the edit in php.php.... it did work for me and few others... if the issue still exist then you need to move on to the second part and contact your hosts to check their mail system behavior....
Ah, that worked. The mail system works now! Thanks.