How to use SMTP in WordPress for sending emails through contact forms?

How to use SMTP in WordPress for sending emails through contact forms?

Talk about any website showcasing the services the company offers, the foremost component is the Contact form. The question arises, why?

The reason is that it’s the only way to request for the services or to get in touch with the executives of the company to knot a deal. This is according to the customer’s perspective however if we see it through the owner’s eye than the contact form is a fruitful conversion or a prospect.

Now, the contact form is easy to get installed as there are a lot of wordpress plugins in the market like “Contact Form” or “Ninja Form” however the technicality starts after its downloaded from the store and installed.

Based on a supposition, whosoever is reading this stuff is a developer and knows a little about SMTP (Simple Mail Transfer Protocol). It’s a protocol that is used up for sending emails which could be a hosting server itself or any external relay host like Gmail, Rediff, SendGrid, Mailgun etc.

There is an SMTP plugin that needs to be installed before we proceed using the Contact Form for sending emails to the customer as well as the owner. Once the contact form conditions or rules are setup, go to the SMTP plugin and fill in the setting mentioned above:

From Email: Email address that you want to get displayed on any email sent from the website

From Name: Name that needs want in all emails sent from the website

Mailer: Service or Server you want to use form authentication and sending emails

SMTP Host: SMTP hostname like that will be used as and SMTP server

SMTP Port: 25, 465,587

Based on the security we need to choose the port number.

  • None: 25
  • SSL: 465
  • TLS:587

Encryption: None, SSL, TLS.

SSL port and secure socket layer will be used for protecting the email content.

TLS port and Transport Layer Security is enabled on the email being sent.


If you want to authenticate using ID and Password before sending emails or without it. You can use the hosting server as an SMTP server for sending emails without authentication.

User ID: Authentication ID of your email address that you chose in the Mailer section

Password: Password for authentication

Once everything is filled in, try sending an email using “Send a Test Email” option from with the plugin. If you get the status as “Pass”, you are all set and good to go.
Open the contact form on your website and fill in the test details for checking in the delivery status, hopefully everything should run fine.

If you are stuck on the contact form technical part and excited to see the Contact form running on your website and sending emails, then get in touch with us. We will investigate the settings and rectify the issue.

Let's connect

Get 30 mins Free Consultation