There is a WordPress plugin named WP Mail SMTP which allows you to send all WordPress emails via SMTP instead of using default wp_mail() function. You also can specify an SMTP Username and Password to force authenticate before sending emails.
After download the WP Mail SMTP WordPress plugin and install it, you should go to its Advanced Email Options page by clicking on Email link in Settings box to specify below configurations:
- From Email - which email address that emails should be sent from, leave blank to keep the default
- From Name – which name that emails should be sent from, leave blank to keep the default
- Make sure ‘Send all WordPress emails via SMTP.‘ option is selected
- SMTP Host – ex: smtp.yourdomain.com
- SMTP Post – ex: 25
- If you need to use SMTP Authentication, let check on ‘Yes: Use SMTP authentication.‘ option then provide an SMTP Username and Password
- Click Save Changes button to make them affected.
That’s all. I’m using the plugin for a my project and it’ working very well.