Sunday, March 31, 2019
PHP mail () function is used to send mail through application script or contact forms.
However, PHP mail function is one of the vulnerable functions on a server and can be used to send a bulk mail which causes server IP blacklisting/Server performance issues. Therefore PHP mail function is disabled on our shared servers.
An alternative option for PHP mail is to use SMTP authentication method in your application script. This uses an email account for SMTP authentication to send an email from the script. Kindly review your website contact form(s) and if you are using PHP mail () function to send an email you should get it updated to SMTP authentication function.
Most well coded/popular scripts/forms come with the option of enabling SMTP in it's settings.
If your website is in WordPress 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.
You can refer the following steps for more details:
1. Install plugin WP-Mail-SMTP from wp-admin
Once it has been installed got to plugin >> wp-mail-SMTP >> setting >> Advanced Email Options and change the following:
From Email: email@example.com
From Name: test
Mailer: Send all WordPress emails via SMTP.
Encryption: No encryption.
SMTP Port: 25
Authentication: Yes: Use SMTP authentication.
Password:email account password
And Save changes.
Now go to plugin >> Contact form >> Settings >> Edit >> Mail:
Both email address should be same here.
Save the Changes.
*Replace your email account where I have mentioned firstname.lastname@example.org.