WordPress uses the PHP mail function to send emails generated by WordPress. However, many hosting servers ( includign W3SERVICES ) are not configured to use the mail function.


Additionally, in order to reduce spam, your email provider often checks whether your email is originating from the location it claims to be originating from. For example, if your email server is yahoo.com but your email claims to be sent from your website’s domain, chances are your form notification will be blocked before it even reaches the spam folder.


SMTP (Simple Mail Transfer Protocol) is an industry standard way to send emails that use the proper authentication method to ensure email deliverability. 


This is why we recommend using SMTP to send emails / systeam alerts / notifications from WordPress OR in your custom application instead of using the default PHP mail function.


How to confiture and use SMTP - 


1 ) Create one email for sending notifications from the system.


2 ) 


$config['from'] = 'noreply@yourodmainname.com';


$config['smtp'] = array(

    'host' => 'dns11.w3services.net',

    'port' => 587,

    'username' => 'noreply@yourodmainname.com',

    'password' => '<your noreply password>',

    'encryption' => 'tls'

);



We hope this guide gives you some insights on the right SMTP configuration with for your 

WordPress OR your custom Application. 



If you are looking for sample code of contact form with SMTP ( phpMailer ), Check this git post - https://github.com/steekam/contact-form-phpMailer 


To avoid any issue in your business email delivery. Its always recommended using Transaction SMTP service for contact form or any notification feature like


https://www.smtp2go.com/?s=w3services


Thank you !!