Send emails from local WordPress setup using SMTP

While doing testing of WordPress in local system many times we need to do the email testing and we can't do it as we don't have SMTP server installed on local system. Without going to option of installing SMTP server on local it would be easier to use free SMTP server to send emails from local WordPress setup. I have already given instructions on how to send emails using SMTP server from localhost which uses phpMailer script. WordPress also uses phpMailer to send emails so we can do the changes in coding files to use SMTP and provide username and password. But that is not a recommended option. We can do it easily using WP Mail SMTP plugin.

After the plugin is installed, activate it and go to Settings -> Email. There you can configure the value of your SMTP server.

To use gmail as SMTP you can give values as below:
SMTP Host: smtp.gmail.com
SMTP Port: 587
Encryption: Use TLS encryption. This is not the same as STARTTLS. For most servers SSL is the recommended option.
Authentication: Yes: Use SMTP authentication.
Username: YOUR.ID@GMAIL_COM
Password: YOUR_PASSWORD

Save the values and then test it by sending a test mail. If you don't want to use gmail SMTP then you can find other SMTP providers and use them. I would suggest https://mandrill.com. It provides free SMTP for limited emails but that should be enough for testing.

Add new comment