Stopping WordPress sent emails from going into the spam folder

One of my clients got frustrated that the emails he is sending out of his WordPress site keep getting into the spam folder of his clients, and asked me to look into it.

Honestly I didn’t have that problem before so I decided to look it up.
The reason for this problem is that the From Email Address is the VPS and more often then not it would be marked as spam.
One solution is probably to create your own Email server but lets avoid hard work if we don’t have to.

My solution for his problem was to use a plugin called WP Mail SMTP what it does is uses a predefined Gmail account (or MailGun or Send Grid) instead of WordPress’s PHP mail() function.

 

Do notice that when using you might need to validate your account more then once, due to some weird issue with the integration with google.
Full guide can be found here.