Knowledgebase

How to send email from WordPress using SMTP (WP Mail SMTP plugin)

Contact form messages not arriving? Order emails from WooCommerce going to spam? By default WordPress sends mail with the PHP mail function, which has no login and is often treated as suspicious. This guide shows you how to send email from WordPress via SMTP with the WP Mail SMTP plugin, so your site emails are authenticated and delivered.

Before you start

Step 1: Install the plugin

  1. In WordPress, go to Plugins then Add New.
  2. Search for WP Mail SMTP, install it and activate it.
  3. Open the plugin settings from the WordPress menu (you can skip the setup wizard and configure it manually).

Step 2: Set the sender

  1. From Email: enter the mailbox you created. It should be on your own domain.
  2. Turn on the option to force this From Email so all plugins use it.
  3. From Name: your company or site name.

Step 3: Choose the mailer and enter SMTP details

If your email is hosted with EgWeb (cPanel email), choose Other SMTP and fill in:

FieldValue
SMTP Hostmail.yourdomain.com (or the host shown in cPanel Connect Devices)
Encryption / PortSSL with port 465, or TLS with port 587
AuthenticationOn
SMTP UsernameThe full email address
SMTP PasswordThe mailbox password

If your domain email is on Google Workspace or Zoho Mail, use the matching mailer in the plugin, or Other SMTP with that provider's SMTP host and an app password if the account uses two-step verification.

Step 4: Send a test email

  1. Open the plugin's Tools page and the Email Test tab.
  2. Send a test to an address you can check, such as a Gmail address.
  3. If it fails, the plugin shows a debug message. Read it before changing settings.
Security tip: Use a strong, unique password for the site mailbox and keep WordPress and plugins updated. A hacked site that can send authenticated mail can damage your domain reputation.

Common problems

  • "Could not authenticate": wrong username or password. The username is the full address.
  • Connection timed out: wrong port or encryption pair. Try 465/SSL, then 587/TLS.
  • Emails still go to spam: check that the From Email domain matches your site domain and that SPF and DKIM pass.
  • Form plugin uses another sender: make sure "force From Email" is on, or set the same address in the form's notification settings.

Frequently asked questions

Do I need SMTP if my site is hosted on cPanel?

WordPress can send without it, but SMTP gives better delivery and lets you see clear errors. It is strongly recommended for stores and contact forms.

Can I use a free Gmail account?

It is better to use an address on your own domain. Mail "from" your domain sent through a free account often fails authentication checks.

Is the plugin free?

WP Mail SMTP has a free version that supports Other SMTP; paid versions add extra features such as email logs.

Need help? Open a support ticket or message us on WhatsApp +20 127 113 3655.

  • wordpress smtp, wp mail smtp, contact form email, woocommerce email, wordpress email not sending

Was this answer helpful?

0 Users Found This Useful