How do I configure Wordpress to Use External SMTP Server?


You can do this with or without plugins by following the information posted here: http://mu.wordpress.org/forums/topic.php?id=5443

***(Please note the link for the coffee2code.com in WordPress forum link above  points to an old/depracated phpmailer plugin, we have updated the local copy of this FAQ below with the CORRECTED/UPDATED plugin link.)
 
Here is a Copy of the Wordpress Knowledgebase Article listed above:

Looking through the forums, there seem to be quite a few people who need to use an external SMTP server for mail.

There are plugins which allow for SMTP configuration

http://coffee2code.com/wp-plugins/configure-smtp/ is mentioned many times in the forums), but the problem is with installation. An email is sent giving the admin password, and the admin password is needed to install plugins...you see the problem.

One solution is to change the admin password in the database, as explained in http://www.tamba2.org.uk/wordpress/phpmyadmin/. This only works if you have access to the database of course, and can be a little harder if you don't have phpMyAdmin.

Another solution is to modify the source code of WPMU.

The way I did it requires changes in 2 files. Please note that this is a quick fix, and I don't normally recommend putting things like an smtp host in the source code! It would probably be best to install the plugin above once you have admin access.
In /wp-includes/pluggable.php around line 197, change

$phpmailer->IsMail();
to
$phpmailer->IsSMTP();

In /wp-includes/class-phpmailer.php, look for the section labeled "SMTP VARIABLES", and change them to the values of your server ($Host, $Port, $Password, etc).
If you don't have access to either the database or the code, you are probably out of luck. 


Comments

Please login to comment