Can I use SMTP to send the email?

Posted by on Jan 29, 2011 in How To, Tips

Can it send mail using SMTP?

Yes, Here is how:

If this is a home or office developer server, you may be able to set the SMTP server to the server of your internet provider. Example: for Comcast DSL, you could use SMTP:

Or set to use gmail:
Set the contact form to send to your gmail address and use gmail to receive your contact form mail.
Optionally you can set gmail to forward the mail to another address you may have.

PHP Version:

Yes. The optional SMTP mail sending feature was added to the PHP Contact Form Version 2.9.8
This setting reconfigures the mail() function to use SMTP instead. Enable if you have to use SMTP protocol to send email. Most users do not have to enable this setting, but sometimes it becomes necessary.
Find this setting on the contact form edit page: “Send E-mail function:”, make sure it is set to “phpmailer”

see image for example settings for sending SMTP with gmail:


WordPress Version:

Get a free gmail account. On the contact form settings page, find this setting: “Send E-mail function:”, make sure it is set to “WordPress”.
Install the plugin called WP Mail SMTP, then set it to use gmail SMTP for mail.

Set these settings for WP Mail SMTP:
Mailer: SMTP
SMTP Host:
SMTP Port: 465
Encryption: SSL
Authentication: Yes
Username: your full gmail address
Password: your mail password.


Windows Server SSL error:

Gmail requires you to use SSL authentication, a further step is required on windows servers if you don’t already have php configured for this:
1. open your php.ini file, and find the windows extensions part.
Now uncomment the ;extension=php_openssl.dll.
2. Save the php.ini file and restart your server.
3.Try running your php again, it should send the mail.

Discuss this issue in the WordPress Support Forum

Do you need help?

Send us a Donation:

Donate to Mike Challis