This is a common error message, and I started this topic to bring people together to find the causes.
Define the problem:
When a user sends an email to another user he recieves this error message-
Failed sending email :: PHP ::
Line : 234
File : /phpbbfolder/includes/emailer.php
Sometimes it only occurs when trying to mass email, sometimes only when a new user is registering, sometimes when private messaging, sometimes when a user emails another, and any combination of these. Some experience it in only one case, others in all. I have seen many solutions to this problem that have worked for many people, but for many others none of these solutions have worked. I hope to collect all the solutions together here. If you have a solution that worked for you, please post it here.
To test to see if the php mail function is working, create a php file with this code snippet in it, be sure to put your correct email address in it.
$to = "put your email address here";
$subject = "test mail";
$body = "Email Works";
mail($to, $subject, $body);
When your browser looks at this page, it should send you a test mail. Mine works, but emailer.php does not work.
If you use Yahoo hosting, you can contact email@example.com for php help via email. I just received this response from them:
Dear Yahoo! Customer,
Thank you for contacting us.
Please note by default, the email link in the post is using 'mailto' tag
which will bring up visitor's own email client. Yahoo! Web Hosting
currently does not allow open relaying, so user won't be able to use
internal PHP mail function to send email to each others.
Please do not hesitate to reply if you need further assistance.
1. Some people have changed the settings in Configuration to use SMTP (usually with localhost as the SMTP Server Address) and had the problem go away. Some had to contact their host for the correct server address.
2. There was a report that McAffee antivirus prevents sending email via the php mail function.
3. A few have solved the problem by uploading a fresh copy of email.php
4. Some have solved the problem by upgrading to 2.0.11, for others this seems to have caused the probem!
5. Yahoo doesn't allow relaying mail, so the user to user function just isn't going to work. You can disable this in the configuration. No SMTP on Yahoo. On the configuration page, in the bottom box, you must use an email address from your website. If you site is xyz.com, the address must be firstname.lastname@example.org This will allow the login/activation email to be sent, and notification emails. NOTE: Yahoo has a 250 email per day limit.
1. Disable email as much as possible in Configuration:
Enable account activation, select None
Enable Visual Confirmation, select No
User email via board, select Disabled
The disadvantage of this is, email doesn't work and no restriction on who can register.
2. Some people just comment out Line 234 with // at the beginning of each line. Doesn't fix the problem but the error message is stopped. For some, the email function is working and they just don't want the error message.
3. Some have changed the error message in Line 234 to something else, like "Success, click on Forum Index or Log In to continue". Details on a way to do this are in this post, http://www.phpbb.com/phpBB/viewtopic.php?t=251848