Skip to content

Web Hosting: Set Up WordPress SMTP

WordPress not sending emails? Set up SMTP with WP Mail SMTP, pick the right port and encryption, and fix timeouts and contact form delivery.

29 November 20265 min read2 Views0 helpful

Introduction

WordPress sends many emails itself: password reset links, notifications, order confirmations, and messages from your contact form. Whether these emails arrive depends on which app your WordPress site runs in on your web hosting:

AppSends without a pluginWhat you need to do
WordPress from the app catalogNo, the app doesn’t include a mail serverSet up SMTP (this guide)
ZAP WebspaceNo, PHP mail() doesn’t send emails hereSet up SMTP (this guide)
ZAP Webspace + MailYes, through your own mail serverNothing, just check the sender (see below)

In this guide, you’ll set up email delivery over SMTP using the free WP Mail SMTP plugin, send a test email, and fix common issues such as timeouts, rejected connections, and contact form emails that don’t arrive.

What you’ll need

To use SMTP, you need a mailbox that WordPress can send from, along with its login details:

  • Your own mail server: A mailbox in ZAP Webspace + Mail, for example, website@yourdomain.com. For instructions on creating mailboxes, see Web Hosting: Set Up Email with Your Own Mail Server.
  • An external email provider: A mailbox with your email provider, such as Google Workspace, Microsoft 365, or your domain provider. You can find the SMTP server, port, and username in their help documentation.

Always use an address on your own domain as the sender. Many recipients reject emails sent from an address on someone else’s domain, such as gmail.com, or send them to spam.

Step 1: Install WP Mail SMTP

  1. Log in to WordPress and open Plugins → Add Plugin.
  2. Search for “WP Mail SMTP,” click Install Now, then click Activate.

If the setup wizard starts afterward, you can use it or close it. It has the same fields as Step 2.

Step 2: Enter your SMTP details

Open WP Mail SMTP → Settings and enter the following:

  1. From Email: An address on your domain, for example, website@yourdomain.com. Check Force From Email so that plugins such as contact forms also use this address.
  2. From Name: For example, the name of your website.
  3. Mailer: Other SMTP.
  4. Enter the connection details from the table, then click Save Settings.
FieldYour own mail server (ZAP Webspace + Mail)External email provider
SMTP HostThe domain of your mail app, for example, www.yourdomain.comThe SMTP server provided by your provider, for example, smtp.office365.com
EncryptionTLSTLS
SMTP Port587587
Auto TLSOnOn
AuthenticationOnOn
SMTP UsernameFull email addressAs specified by your provider, usually the full email address
SMTP PasswordMailbox passwordPassword or app password, as specified by your provider
Tip: Why use port 587?

On new VPSs, outgoing connections over ports 25 and 465 are blocked until you verify a phone number in your account. Port 587 isn’t affected and works right away. In the plugin, TLS means that the connection over port 587 is encrypted using STARTTLS. SSL is used with port 465.

For Google Workspace, Gmail, and Microsoft 365, WP Mail SMTP also offers dedicated options under Mailer that let you sign in to your account. For Google, if you select Other SMTP, you’ll need an app password; your regular password won’t work.

Step 3: Send a test email

Open WP Mail SMTP → Tools → Email Test, enter an address you can check under Send To, and click Send Email. If the plugin reports success and the email arrives in your inbox, everything is set up. If you see an error, you’ll find the solution in the next section.

Email delivery issues: causes and solutions

Error message or symptomCauseSolution
Connection refused or timeout with port 465 or 25Ports 25 and 465 are still blocked on your VPS.Use port 587 with TLS, or verify your phone number. See Web Hosting: Fix Email Issues and Improve Deliverability.
Timeout after about 30 seconds, “SMTP connect() failed”The encryption and port don’t match, for example, SSL with port 587 or TLS with port 465.Use port 587 with TLS or port 465 with SSL.
Timeout even though the port and encryption are correctThe SMTP server address is misspelled, or the server doesn’t accept connections on that port.Check the spelling. Use the Port Checker to see whether the server responds on port 587.
“Authentication failed” or error 535The username or password is incorrect.Use the full email address as the username. For Google, use an app password.
Certificate error with your own mail serverThe IP address is entered as the SMTP server, or the certificate hasn’t been applied yet because it was installed recently.Enter the domain of your mail app as the SMTP server and try again in a few minutes.
Test email arrives, but emails to external recipients get stuck on your own mail serverSending to external recipients is blocked until you verify your phone number.Verify your phone number. See Step 6 in Web Hosting: Set Up Email with Your Own Mail Server.
Emails end up in spamSPF, DKIM, or DMARC records are missing, or the sender address isn’t on your domain.Check your DNS records and use an address on your domain as the sender. See Web Hosting: Fix Email Issues and Improve Deliverability.

Ensure contact form emails are delivered

Many contact forms use the visitor’s email address as the sender. The email is then sent from your server but claims to be from someone like max@gmail.com. Recipients can detect this using DMARC and may reject the email or send it to spam.

Here’s how to set up your form correctly, using Contact Form 7 as an example (Contact → Edit form → Mail tab):

  • From: An address on your domain, for example, Your Website <website@yourdomain.com>.
  • Additional headers: Reply-To: [your-email]. This way, your reply will still reach the visitor.

Other form plugins have similar fields: Always use your own address as the sender, and put the visitor’s address in “Reply-To.”

Warning: Protect your forms from spam

An unprotected form can quickly be abused by bots to send spam. This can get your VPS IP address added to blocklists, which can prevent your regular emails from arriving, too. Enable a CAPTCHA or honeypot field in your form plugin.

WordPress in ZAP Webspace + Mail

If your WordPress site runs directly in the ZAP Webspace + Mail app, you don’t need an SMTP plugin: PHP mail() sends emails through your own mail server, and the emails are signed with DKIM. Just make sure the sender address is on your mail domain. You can still use an SMTP plugin, for example, to keep a delivery log. If you do, enter the details from the “Your own mail server” column.

Conclusion

With WP Mail SMTP, port 587, and TLS, WordPress can reliably send emails from your web hosting, whether you use your own mail server or an external provider. Use your own address as the sender in your contact form and protect it from spam. If you need help, our support team will be happy to assist you.

Free tools

Related tools for HTTPS, domains and servers

View all

FAQ

Frequently asked questions

No. In ZAP Webspace + Mail, PHP mail() sends emails through your own mail server. You only need a plugin with the WordPress app from the app catalog or ZAP Webspace without Mail.
Use port 587 with TLS (STARTTLS). Outgoing connections over ports 25 and 465 are blocked on new VPSs until you verify a phone number in your account.
Either port 465 is still blocked on your VPS, or the encryption doesn’t match: port 465 requires SSL, while port 587 requires TLS. The easiest fix is to switch to port 587 with TLS.

Feedback

Was this article helpful?

Your feedback helps us prioritize and improve content.

0 of 0 people found this article helpful.

Personal support

Need more help than the guide provides?

Our ZAP-Hosting support team knows your product — briefly describe your issue and we'll help you personally.

Zappy knows this guide and answers you right in the chat.