How to set up SMTP with WordPress

Sending emails from your WordPress website can be a pain at times because some hosting providers are blocking php mail. This causes issues with the delivery of messages from your contact forms, orders, and notifications. Lucky for us, there is a workable solution for this problem.

Why isn't WordPress sending email from the contact form?

WordPress comes with basic php mail functionality by default, which means that your WordPress-powered website will send mail using PHP on the server rather than a real email address. PHP will generate the sender’s name (e.g. wordpress@yourwebsite.com) and will not use an actual email address. As a result, email messages sent in this manner are frequently marked as spam.

Also, almost all major hosting providers do not allow PHP mail because it is a common way for spam emails to be generated. This can be a serious issue because your contact form messages, orders, customer and admin notifications will end-up being not delivered.

Use SMTP to send real emails in WordPress

The solution to this problem, is to ensure that your WordPress website delivers all emails by sending 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 hosting companies provide cPanel or a similar control panel from which you can create a new email address for your domain. For instance, email@mywebsite.com or something similar. Now, go to your cPanel and navigate to the Mail section.

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

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.

Easy WP SMTP

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.

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. name@mydomain.com

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.

Conclusion

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.

Facebook
Twitter
LinkedIn
Search

Recent Posts