Failed Sending Email

General Error
 
Failed sending email :: PHP ::
 
DEBUG MODE
 
Line : 234
File : emailer.php

This is a fairly common error that can appear in many situations when using phpBB 2. It can be triggered during any process that causes the board to send an e-mail, including registration, posting, or sending mass e-mails. There are a few different possible causes of the error, depending on the situation. Ultimately, they all come down to the same thing: your server has a problem sending e-mails.

The Sendmail Solution

By default, phpBB tries to send e-mail out using the PHP mail() function. For mail() to work, the server must have a software package called "sendmail" installed and functioning. If sendmail is not installed or not working correctly, every attempt to send e-mail will trigger this error message. Unfortunately, only server administrators can install sendmail or repair problems with it. If you've suddenly begun getting the "Failed sending email" error from any board operation other than mass e-mails, contact your hosting company or server administrator and ask them to check on sendmail.

The SMTP Solution

If sendmail is not available on your server (this is common on Windows machines), you may have to use a third party solution to send e-mails. SMTP is a way of routing e-mails through another server, instead of the server hosting the forum. Some hosting companies provide SMTP services to their clients. If your host does not, you will have to locate a remote SMTP service on your own; try Google. Some internet service providers (ISPs) provide SMTP mailing services to their clients, so that may also be an option for you.

Once you have an SMTP service you can access, you must configure your forum to use this service. You will find options for this in phpBB's Admin Panel, on the General Configuration page. You must fill in the SMTP server address. Other information, like the username and password for the SMTP server, may be required as well. Make sure you get that information from your SMTP service provider.

Other Solutions

Sometimes, the problem is not in the e-mailing method, but the forum coding. If this error appears only rarely or in certain specific instances, double check the code of any files that appear to be related. Any recently installed modifications on those files could be the source of the problem.

Some servers limit the number of e-mails that can be sent from a site in a certain amount of time, such as no more than 1000 e-mails per 24 hours. When running a very active site, you may hit this limit, if one applies to your site. If this happens frequently, consider looking for an SMTP service (or another one, if you already use SMTP).

Mass E-mails

The mass e-mail features of phpBB can present their own unique twist on this problem. In addition to limits on the number of e-mails sent in a certain amount of time, some server limit the number of recipients per e-mail. When you use phpBB's mass e-mail feature, the forum sends only one e-mail. However, that e-mail is address to every member of your forum. If you have five hundred members, that e-mail has five hundred recipients listed. Many servers prevent sending of e-mails with a large number of recipients.

In these cases, the solution is to install a modification that breaks the recipient list into smaller sections. These modifications send more e-mails, but each goes to fewer people. One such modification is MegaMail.

The SMTP Error Variation

Sometimes, the error message will be different. When you are using an SMTP service, error often appears in the form below. Notice that this version says "SMTP" instead of "PHP." It may also have an additional message, represented by the placeholder message here.

General Error
 
Failed sending email :: SMTP :: message
 
DEBUG MODE
 
Line : 234
File : emailer.php

In this form, the error represents a problem with the SMTP server. The nature of the problem is indicated by the additional message. Many times, this is the result of an settings for the SMTP server in the phpBB Admin Panel. Check those settings against information provided by the SMTP service provider. If the settings appear correct, there may be another problem. Use the additional message provided as a guide for solving the issue.