This solution comes in the form of a plugin. SMTP and php mail plugins make sure emails are authenticated and properly sent through third parties. The plugin I use to fix this is Post SMTP Mailer/Email Log.
Go to one of the suggested mailers websites and sign up for an account (I used GMail). All you need to do is set up a free account in the Google API Console. Enter the Google email address that will be used as your admin email for the website, and your company or website name in the Name field. Click next, the setup wizard should automatically set smtp.gmail.com as the Outgoing Mail Server Hostname. Click next.
The wizard should automatically select the recommended Socket as SMTP – gmail.com:587. In the Authentication section, make sure the option is set as OAuth 2.0 rather than Password. OAuth is more secure and strongly recommended. Click next, at this point you’ll arrive on the Authentication tab of the wizard, and in order to proceed with the configuration, we need to set up a separate, free tool called the Google API Console.
Open the Google API Console here. Make sure you’re signed in using the correct Google account, by clicking the profile icon in the top-right of the window. If this is the first time you’ve used the Google API Console for your Google account, go through the sign up instructions, then click the Agree and continue button. Whereas if you’ve used the API Console before, you can just Create a project then click Continue.
Either way, you should then see the below message confirming that the API has been enabled. Click the Go to credentials button. Click the 3 dots icon in the top-right of the window, then Project settings. Rename the project to something memorable – I usually recommend “SMTP for [your website name]” then click SAVE.
Similarly, you will then be shown a unique client ID and client secret – copy/paste these values into the matching fields in the Post SMTP wizard in your WordPress dashboard. Click OK in the OAuth client window, and Next in the Post SMTP wizard. Click next, and finish. In your WordPress dashboard, click Post SMTP then click Grant permission with Google, Select the same Google email address that you specified in the earlier steps and click ‘Allow’. We’re nearly there – the next stage is to test with a dummy email. In the plugin dashboard, click the link to Send a Test Email. Specify a recipient of your choice (probably another email account you hold or you can see quickly – colleague sitting next to you perhaps?). All being well, you should then see a confirmation that the test was a success, and an email should arrive in the recipient mailbox you specified!
Of course, as part of my web design and development services, I am happy to help with any problems with contact forms not sending from your website. If you have any such issues, don’t hesitate to get in touch!