WordPress not sending emails? Set up SMTP with WordPress

Sending emails from your WordPress website can sometimes be a very pesky issue as some hosting providers are blocking php mail. This results in problems with delivering messages from your contact forms, orders, and notifications. Luckily, there is a solution.

Why WordPress doesn’t send email from the contact form?

WordPress in its default setup comes with plain php_mail functionality, which means that your WordPress-powered website will send mail using PHP on the server and not a real email address. The name of the sender of this email will be generated by PHP (e.g. [email protected]) and will not use an actual email address. This often results in email messages sent in this way to be marked as spam.

Also, almost all major hosting providers are not allowing PHP mail as it’s a common way to generate spam emails. This can present a real problem as your contact form messages, orders, customer & admin notifications will not be delivered.

Use SMTP to send real emails in WordPress

Luckily, there is a solution to this problem. In order to ensure that your WordPress website delivers all emails is to send all those messages using SMTP.

What is SMTP?

Simple Mail Transfer Protocol (SMTP) is a communication protocol for electronic mail transmission. It refers to the basic email functionality and it means that we will send emails using the real email address.

So, we are going to use SMTP to send emails using the real and existing email address which will result in great deliverability.

Create a new email address

Most of the hosting providers are offering cPanel or a similar control panel where you can create a new email address at your domain. For example, [email protected] or something like that. Now, access your cPanel and open up the Mail section.

create cpanel email

You will see the option to create a new email address.

create cpanel email 2

Then just enter the name for this email per your own discretion and set the password for it.

cpanel email password

Once you create a new email address for your website, note down the full email address and password and proceed to the next step.

Setting up SMTP in WordPress

Now it’s time to install the SMTP plugin for your WordPress website. The SMTP plugin will handle all emails generated by your WordPress website and deliver them using the SMTP protocol instead of the php mail function.

There are a couple of SMTP plugins for WordPress, you can search the WordPress repository to find the one that fits your needs in the best way.

We do recommend Easy SMTP for WordPress.

Installation of SMTP plugin for WordPress

The easiest way to install the Easy SMTP is to access the WP admin -> Plugins -> Add new. Here just enter the words Easy SMTP inside the search form on the right side and wait for the results. Once the plugin is listed, click on install and activate.

easy smtp wordpress installation

Once you install and activate the plugin, go to the next step, configuration.

Configure Easy SMTP

Access the Easy SMTP settings inside WP admin -> Settings -> Easy WP SMTP. You will see the general settings page with the option to insert the name of the sender, email address, a password for your email address, SSL/TLS, and port.

You should set the option “From Email Address” to the real email address you created earlier.

Option “From name” should contain the name of your website.

Now, paste the password for your email in the password field. (the same password you create in the process of opening a new email address) Reply email should be the same, but you can also specify another email of your choice.

SMTP host is usually mail.yourdomain.com, but your hosting provider could be using another. For all cPanel servers, mail.domain.com is the default SMTP host. If you cant find the SMTP host, you can reach out and ask your host.

The type of encryption can be set to none, SSL/TLS or STARTTLS, it depends on the mail server setup. Usually, it’s the SSL/TLS.

SMTP Port should be set to 465 or 587 if you are using cPanel and SSL/TLS. If you don’t use encryption, just set it to the default SSL port 25.

No, set the SMTP Authentication to yes and enter the SMTP Username and SMTP Password you noted while creating the email. Please note that you need to enter the full email address in the SMTP Username field, e.g. [email protected]

Test Email sending

After you enter all the data and save changes. Access the Test Email tab and try sending the emails to validate the setup.

test email sending


After you manage to set your WordPress to send out the real email messages using SMTP you should have no worries about the missed emails anymore. In this way, your WordPress website will deliver mails to Gmail, Yahoo, and custom email servers across the internet without problems.

If you still have problems with email deliverability, give us a shout in the comments section and we will help you out.

Share this post if you like it.
Davor Veselinović
Davor Veselinović

I'm Davor aka. Worda, founder of Worda Themes. Working as a Full Stack Developer with more than a decade of experience with WordPress. I build themes and plugins and enjoy writing useful blog posts and sharing my ideas with others.

Leave a Reply

Your email address will not be published. Required fields are marked *