MyBB Community Forums

Full Version: PHP mail not sending - Please help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6
Mail Handler: SMTP mail
SMTP Hostname: smtp.yourhost.com/org/etc.
SMTP port: *If needed, 25
SMTP username: *If needed, whatever the host gave you
SMTP password: *If needed, what you used for the account above
Encryption: not needed, unless the host allows it/tells you to
Mail Logging: your choice

In my case, I needed someone to set up the smtp.myhost.org. Also, I didn't need to specify a port or username and password. Doesn't sound like a bug, just needs to be setup with your host/provider I'm guessing.

EDIT: Also make sure under ACP -> General Configuration you have the email set up. Admin email ([email protected]), and Contact Us email (mailto:[email protected]).
dcaduser, there isn't really anything we can do. We can only suggest you talk to your host to try and resolve the issue with the mail() function only intermittently working, or try setting up SMTP
I can't use smtp either, I've tried. My host has PHP mail activated. It worked perfectly fine with MyBB 1.2 and my host changed nothing. The only change was upgrading to the 1.4 series and I'm currently using 1.4.2. Now, since it works here but not on my sites there must be something different. I need to know what the difference is so that I have some clue as to what to request of my web host or change myself.

My web host has suggested that I get help from you, the developers, to help narrow down this problem. As of yet I haven't received any guidance in that regard, other than to run the test - which I did and it works just fine, thus indicating that the problem is within the forum software and/or settings and not with the web host.

I feel like I'm just being run in circles and getting no where with this issue.

If a developer would just log-in to either or both of my forums, (links and invite previously posted in this thread) I will gladly give admin permission, so that the settings and requirements can be verified to be configured correctly (or not) then I, you or my host might be able to get this problem sorted out.

Could it be the theme I'm using?
Does something else need to be activated? (PHP send mail already is)
Are my forum mail settings correct?
Is there a configuration problem?
Is a plug-in causing the problem?
Is a task not working or missing?
Does the PHP mail script need a small tweak?
Is there a script missing or not where it's expected to be?
Do I need to CHMOD a folder, script or other file?
Did I screw up something when attempting to initially set-up SMTP? (My host does not support/allow SMTP)

There is even a chance that something was not uploaded or not placed in the proper folder or is not CHMODed correctly when I updated to 1.4.1 or 1.4.2. However, the install/upgrade scripts indicated no errors, except for a couple of CHMOD settings, which I corrected and re-ran the script as instructed with no other errors indicated.

As you can see, I have absolutely no idea as to where to even start looking or even what I should be looking for. I, and my web host, still remain stumped as to why mail is never being sent from the forums but, when using the test script, it works perfectly.

Again, please more help and/or guidance is desperately needed - I'm begging you.

I almost expect that it will be something so simple that the "DUH! factor" will come into play and I'll have to kick myself for not seeing it on my own. That already happened once with one setting I had to set to 'localhost' for it to work. I think it had something to do with one of the theme settings, if I remember correctly.

-----------------------------
Arggh - My web host's MySQL server is down right now, so you may not be able to get in to the forums until they fix that problem (again). I sent them a notice about it.
Can you try the attached file.
1) Upload it to inc/mailhandlers/
2) Rename the existing php.php to php-old.php
3) Rename the attached file to php.php

Try mailing again
Thanks, I'll try it as soon as my host deals with the spam sites that seem to keep bringing the MySQL server down. (which still is)

I'll report back with the results as soon as I can.
There's an error in that file...

		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,);
		}

Should be

		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);
		}

Smile

(1.4 doesn't work for me... 1.2 works fine - still gives me a "MyBB was unable to send the email using the PHP mail() function." error)...
So it still isn't working even after you changed it?
(2008-10-16, 06:30 PM)DennisTT Wrote: [ -> ]So it still isn't working even after you changed it?

Yep I changed it, and it still doesn't work - gives me the same error. I've tried it on our work servers that hold Outlook Exchange, a web server and through Mercury mail (through XAMPP) and still no luck.

Undecided
(2008-10-17, 07:50 AM)Tom.M Wrote: [ -> ]
(2008-10-16, 06:30 PM)DennisTT Wrote: [ -> ]So it still isn't working even after you changed it?

Yep I changed it, and it still doesn't work - gives me the same error. I've tried it on our work servers that hold Outlook Exchange, a web server and through Mercury mail (through XAMPP) and still no luck.

Undecided

Have you tried the script at [Wiki: Help:Mail] (Broken link, head over to docs.mybb.com instead)?
The only way I can get that to work is if I do to it a local address, such as admin@localhost...

A common error that comes up is that the mail server doesn't understand the MAIL FROM command, which happens on our work's exchange server, which uses it all the time apparently.

So basically, I have a forum that can't send emails at all - via PHP or SMTP. Feel free to let me know suggestions - I have a deadline of November-end... Toungue
Pages: 1 2 3 4 5 6