Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

How to Use SMTP Server to Send WordPress Emails (Step by Step)

Struggling with WordPress email issues is a common problem among our readers. Meanwhile, reliable email is very important for things like password resets and order confirmations.

To ensure a great website experience, you’ll need to ensure your emails reach their destinations. This is where an SMTP server comes into play.

Since we send a lot of emails from our websites, we know the easy way to improve email deliverability. And in this guide, we will show you how to use an SMTP server to send WordPress emails.

SMTP-server-to-send-WordPress-emails-OG

The Problem With WordPress Emails

WordPress uses PHP for most of its functions, including sending emails.

Many shared hosting providers do not have the email function configured properly or have disabled it entirely to avoid abuse. In either case, this can prevent your WordPress emails from being delivered.

The alternative solution is using a third-party email service to send your emails. You can use services like Mailgun, Google Workspace, or SendGrid.

You will have to pay for your account, and the cost will vary depending on how many users you add or the number of emails you send. For more details, you can see our tutorial on how to fix the WordPress not sending email issue.

Additionally, some web hosts limit the number of emails users can send from their servers. For more information about why WordPress emails won’t send, check out our blog post on why you should never use WordPress to send newsletter emails.

There is another option, however. You can use SMTP to send emails using the WordPress hosting that you already have.

SMTP, which stands for Simple Mail Transfer Protocol, allows you to use an external mail server to handle email delivery. This ensures higher email deliverability rates and can prevent your emails from landing in the spam folder.

Video Tutorial

Subscribe to WPBeginner

For written instructions, just continue reading. Here’s a quick overview of all the topics we will share in this guide:

Let’s dive right in!

Using Email Accounts by Your Host

Most WordPress hosting providers offer email services for each domain you host with them. This means you can create email accounts with your own domain name, like yourname@yoursite.com.

Using your website’s domain will help you engage your subscribers from your email list and help you stay on-brand by sending messages with your domain name rather than a personal inbox.

So, let’s create an email account first and foremost. For this example, we’ll show you how to create an email account using Hostinger. Your hosting service provider may use a different account management system, but the basic process is the same on most hosting services.

You’ll first want to log into your hosting account and click ‘Emails’ to create a new email under your domain. Then, go ahead and click ‘Manage’ next to your domain.

email account hostinger

After that, you’ll want to click the ‘Create email account’ button.

This will allow you to set up a business email under your domain name rather than the default version that WordPress gives you.

create email account

You’ll then see a simple form where you need to fill out the information required to create your email account.

Since we will be using this account to send WordPress emails, we recommend that you create an email account like wordpress@example.com. Make sure to replace example.com with your own domain name.

Go ahead and enter your email name and password. Then, you can click ‘Create.’

create email name and password

From here, you’ll be asked to configure third-party email services to connect to.

That said, you can choose ‘Other’ if you don’t want to use any of the given services.

configure apps and devices

Let’s copy the SMTP Host and Port since you’ll need to add that information to the settings of your WordPress SMTP plugin to start sending emails reliably.

The SMTP Host will allow you to send emails from the email address you’ve just created, and the SMTP Port is for secure login.

Finally, go ahead and click on ‘Complete, I’ve set up my client.’

SMTP host and port

If you’re using another hosting provider, like Bluehost or SiteGround, you can check the support section on your host’s website for this information. Most likely, there will be an article providing this information. If you don’t find it, then you should contact the hosting support to request this information.

Using Your Branded Email Address in WordPress

Unfortunately, WordPress doesn’t offer built-in native SMTP settings by default. If you want to configure SMTP in WordPress for emails, then you must install an SMTP plugin.

Using a WordPress SMTP plugin allows all of your emails to reach the desired destination by connecting to a server that handles all types of emails. It will replace the default method of sending emails through WordPress, which uses the unreliable PHP mail system.

With that in mind, let’s install and activate the WP Mail SMTP plugin. If you need help, you can refer to our step-by-step guide on how to install a WordPress plugin.

WP Mail SMTP website

Used by over 3 million websites, the WP Mail SMTP plugin is the best SMTP plugin for WordPress. It allows you to easily fix your emails by sending them through an email provider, which is a much more reliable way of sending emails than your web server. 

Upon activation, you can navigate to Settings » Email to configure the plugin settings.

First, you’ll need to enter the email address you just created in the ‘From Email’ field. After that, you can add a ‘From Name’ that will be used as the sender name.

WP Mail SMTP Settings

The next step is choosing the mailer.

Go ahead and check the ‘Set the return-path to match the From Email’ box next to ‘Return Path.’ This option sets the return path to match the sender’s email address. If you leave it unchecked, bounced messages and non-delivery receipts will be lost.

Then, you can click the ‘Other SMTP’ option. If you have another mailer service, you can select that instead.

Other SMTP

Note: The free version of WP Mail SMTP supports SendLayer, SMTP.com, Brevo, Google Workspace, Mailgun, Postmark, SendGrid, SparkPost, and Other SMTP.

Plus, the Pro version supports Amazon SES, Microsoft 365/Outlook, and Zoho Mail, in addition to all the free options. With the Pro version, you can also turn on the ‘Detailed Email Logs’ and ‘Instant Email Alerts’ features. The email logs allow you to keep records of every email sent out, and the email alerts inform you whenever your site fails to send an email.

Next, you’ll need to set up SMTP options. The first thing to do here is to enter your SMTP host and port that you copied earlier.

Typically, the SMTP host is mail.yourdomain.com (don’t forget to replace yourdomain.com with your own domain name). And Port 465 is commonly used for SMTP. If you lose these details, you can obtain them from your hosting provider.

Now, depending on your hosting provider, they’ll provide an encryption method when signing up for an email account. It can be an SSL or a TLS encryption.

In this case, Hostinger provides an SSL encryption method, so we will select that option.

Choosing the encryption method is important because it ensures your emails are secure and private. Without it, unauthorized parties could intercept and read the content inside the emails.

smtp host and smtp port

Next, you’ll want to turn on the authentication toggle and provide your SMTP username and password. Normally, your email address is also your SMTP username.

Then, go ahead and give your SMTP account a password.

SMTP username and password

You can always use a password manager, like 1Password, to securely manage your passwords.

Finally, don’t forget to click the ‘Save Settings’ button to store your changes.

save settings

Keep in mind that if you have another mailer service, you can add that service as a backup connection. This means that if an email fails to send using your primary connection, WP Mail SMTP will automatically try to send it again using your backup connection.

If you’d like to add another mailer service, just hit the ‘additional connection’ link shown in the screenshot above, and WP Mail SMTP will guide you through the process.

And if you don’t have Hostinger, these steps will look a little different. In that case, you may want to check out our ultimate guide on how to set up WP Mail SMTP with any host.

Testing Your SMTP Settings

Now that you have set up WP Mail SMTP to send emails, let’s test if everything is working fine. To get started, you can head over to WP Mail SMTP » Tools from the WordPress admin panel.

Under the ‘Email Test’ tab, you’ll need to provide an email address where you would like to receive a test email. This could be any valid email address that you can access.

Go ahead and toggle the HTML button to ‘ON.’ After that, you can click the ‘Send Email’ button to continue.

send a test email

WP Mail SMTP will now send an email message using the SMTP settings you entered earlier.

If you check your inbox, you should see a success message informing you that the email was sent successfully.

WP SMTP success message

Troubleshooting WordPress Email Issues

The most common reason for errors in sending emails using SMTP is an incorrect SMTP host or port.

So, always make sure that you are entering the correct host and port settings provided by your hosting provider.

smtp host and smtp port

Plus, you should double-check to see if you have selected the correct encryption method.

SSL usually works in most environments, but if anything, we recommend checking with your web host to see why your emails are not getting delivered.

Resending Emails Manually

Even if there aren’t any SMTP configuration errors, you may still experience temporary issues.

For example, the recipient’s email server might be bouncing emails, or the mailer service may place a cap on the number of emails you can send per day. If you exceed the allowed number of emails sent in a given time frame, the emails may be rejected.

In that case, you can simply resend it to those specific recipients. All you have to do is head over to WP Mail SMTP » Email Log.

Simply check all of the boxes next to the emails that failed to resend. Then, under the ‘Bulk Actions’ dropdown menu, you’ll want to select the ‘Resend’ option and click ‘Apply.’

resend emails

This will open a pop-up message asking you to confirm whether you want to resend the selected emails.

Go ahead and hit the ‘Yes’ button.

heads up message

Finally, you’ll receive a confirmation message on the screen that the emails are in the queue and will be resent shortly. You can click ‘OK.’

There you have it! Now you know how to successfully use an SMTP server to send WordPress emails.

ok button

Pros and Cons of Using Your Web Host’s Mail Servers for WordPress Emails

First things first, the most obvious advantage of using your web host’s servers for sending emails in WordPress is that you can use your own branded email address.

Another pro is that you have already paid for this service when signing up for your hosting account. You will not need to pay any extra money to send and receive emails.

However, some WordPress hosting providers enforce limitations on outgoing emails. This is why we don’t recommend using WordPress to send newsletter emails and suggest using SMTP for transaction emails alone.

Another common problem with shared hosting providers is that their mail servers can be quite unreliable at times. If you notice delays in email delivery, then you should consider using third-party email services like Google Workspace, Mailgun, or SendGrid.

We hope this article helped you learn how to use an SMTP server to send WordPress emails. Next, you may also want to see our guides on how to send WordPress emails using Amazon SES and how to create a free business email address.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us. Here's our editorial process.

Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!

Reader Interactions

29 CommentsLeave a Reply

  1. Syed Balkhi

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. Jiří Vaněk

    WP Mail SMTP has saved me on many websites where the webhost didn’t have the mail function enabled. It’s a plugin that has been a must-have in all my WordPress setups for some time now. If a person has DNS properly configured for their domain (DMARC, DKIM, and SPF), then this plugin can solve really 99% of all email sending issues. For me, it’s a must-have.

  3. Moinuddin Waheed

    This plugin is one of the few plugins that must be there in every wordpress installation.
    The uncertainty of emails not getting delivered is very problematic.
    I have installed this plugin on my website and now I am free of any such email deliverability concern.
    Thanks for the detailed guide.

  4. MH

    If there have any option to configure multiple email as SMTP ?
    I have two contact form and need to email sent from different email address.

    • WPBeginner Support

      You would want to check with the support for your contact form to see what is available.

      Admin

  5. Alexandru-Eugen Toma

    Thank you very much for much!

    • WPBeginner Support

      Glad our guide was helpful :)

      Admin

  6. khatamband

    I used today WP Mail SMTP
    I used google apps for smtp authentication and testing it with test
    but if I fill website fom, no mail is received
    I also tried hosting email address for smtp authentaction. This was also successful in sending test mail, but for form mail — no mail received, although giving success output.
    I also checked spam folder for both, nothing there too.

    So where can be the issue

  7. Sean

    Hi when i passed the code into the wp-config file my site stopped working, then i removed it and it still not going up.
    Please help!!

    • WPBeginner Support

      Hi Sean,

      Are you seeing an error or just white screen? Here is how you can replace your existing wp-config.php file with a fresh copy.

      First, you need to connect to your website using an FTP client and download a copy of your wp-config.php file to your computer as a backup.

      Next, you need to visit download a copy of WordPress from WordPress.org. You will need to unzip it, and inside you will find a file called wp-config-sample.php. Rename this file to wp-config.php.

      Now open the wp-config.php file you saved earlier as the backup. It contains your WordPress database information. Like database name, password, host, table prefix, etc.

      Copy the information from your backup to the new wp-config.php file and then upload the new file back to your server using the FTP client.

      Admin

      • Sean

        Hi I just found the problem. There was missing space in the first line.
        It’s strange cause I never edited it.. but everything is fine now. Thanks for quick response.

  8. Abby

    Hi:

    we are setting up a WordPress multi-site server. Our concern is if we use WordPress SMTP email how do we lock it down to ensure that it is not turned into an email spam bot? We occasionally experience DDOS attacks that are obviously looking for and scanning our existing business network for vulnerabilities and we do not want to give them a point of entry through the new WordPress multi site server. At present we use a self hosted exchange server for email and we have port 25, 465 and 587 locked down.

    Thanks
    Abby

  9. Luke Cavanagh

    Transactional email providers like SendGrid or SparkPost are very reliable for site email.

  10. Beata Raju

    Hi,
    Thank you for the article, it’s really helpful. I’ve have a WordPress site hosted by HostGator with a shared server subscription. Do you know whether their email service is reliable or not? I’ve somehow managed to hook up my @mysite email address to outlook.com webmail but it does take forever for emails to come through. Do you think I should try another solution?
    Many thanks in advance,
    Beata

  11. Michael

    Sadly this option is not available in cases where GoDaddy is the host, as the blocks all outbound SMTP to ports 25, 465 and 587 to all servers except their own. :(

    Trying Amazon SES per helpful comments above.

  12. Anssi

    Hi!
    Any tips how to speed up the sending process when using SMTP? CF7 form takes up to 10 seconds when using SMTP and 1-4 senconds while using PHP Mailer.

  13. Wendy

    Hi, i am new to wordpress.
    I am trying to configure email address using own company email.
    It was tested successfully while setup.
    But it prompt error when trying to submit request during the website.

  14. FATOYINBO

    God bless you, it works like magic

  15. Marcelo Luz

    Works fine with WP 4.9.3.1 Thank you for the tip! ;)

  16. Will

    Yes! This is the way to do it. In my case I use hostgator so it’s mail.mydomain.com and port 25 (standard email port). I was trying to use gmail and it didn’t work. I’m not sure why my site stopped working for the built in php mail even though it works on other domains on the same account.

  17. Lynn Dye

    This is very timely. I’ve been struggling with this on behalf of a client. When I talked them into using the built-in email of their host along with setting up domain-branded email, it took care of most problems.

    The other problem we’ve been having is getting notification emails to go to a yahoo email address. These have failed with an error message ‘not able to reach the server’, or perhaps a time-out of the server. I had that recipient get a gmail address for notifications to go to, but we’ve not seen the results yet.

    Just an PSA to folks – when I was digging into why folks with the yahoo and aol emails were not getting their notifications, the Gravity Forms folks had in their forum an article on why notifications may not be going out. Seems AOL & Yahoo have very stringent rules on accepting emails from something that looks spammy (the acronym was DMARC), I believe. So when I got one business to get rid of AOL, their problems cleared up. The other business uses Yahoo for their business email (yes, people still do it). They were not getting notified regularly and that’s why I asked them to set up a gmail.

    I will also be using some of the suggestions in this article to hopefully permanently fix this problem.

  18. Alain Aubry

    If you use Mandrill you may use wpmandrill

  19. Firdaus Azizi

    Used to be using WP Mail SMTP with Gmail. But since it’s not supporting oAuth, I’m now using Postman SMTP.

    I find Postman SMTP is more user friendly + it has a log file for us to check all the emails that are being sent.

  20. sazia kazia

    Excellent article we really need this to set up email for wordpress. I will definitely try this thanks for sharing. :)

  21. Maggew

    Decent article yo. SMTP is great if you don’t send out more than 500 emails a month.

    On my site, I use Amazon SES to deliver all mail. It’s affordable at like 10,000 emails for $1 and it’s 100% guaranteed to deliver into the inbox (assuming you setup / configured properly).

    • Abel

      I also vouch for Amazon SES. Have also successfully used MailGun for free.

  22. Jeff Cohan

    I appreciate the tutorial. However, at this writing, the WordPress dot org plugin page for WP Mail SMTP shows that the newest version of the plugin (a) hasn’t been updated in 12 months; (b) is compatible only up to WP 4.0.8, and (c) is broken (6 of 8 votes) for WP 4.3.1. What do you advise?

    • WPBeginner Support

      We tested it and it works fine. If you enter the correct information in plugin settings, it would work.

      Admin

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.