# Send WordPress email over SMTP
Source: https://docs.webgee.com/en/hosting/wordpress/how-to-send-emails-in-wordpress-using-the-wp-smtp-mail-plugin



Make WordPress send its email through an authenticated mailbox instead of PHP's
`mail()`. Applies to shared, reseller and Premium hosting.

By default WordPress sends via `mail()`, which produces unauthenticated messages
that fail SPF and DKIM checks. Contact form submissions, password resets and
WooCommerce order confirmations then land in spam or vanish. Sending over SMTP
fixes that.

## Before you begin [#before-you-begin]

You need a mailbox **on the domain the site runs on**. A Gmail or Outlook address
will not work — the whole point is that the sending domain matches the
authenticated account.

Create one under **cPanel → Email Accounts** if you have not already, and note
its password.

## 1. Install the plugin [#1-install-the-plugin]

1. In WordPress, go to **Plugins → Add New**.
2. Search for **WP Mail SMTP**.
3. Install and activate **WP Mail SMTP by WPForms**.

The setup wizard opens on first activation. You can follow it, or select
**Go back to the Dashboard** and use the settings page directly — the fields are
the same.

<Callout type="info">
  The free version is all you need. WebGee's SMTP works without the Pro upgrade.
</Callout>

## 2. Configure the sender [#2-configure-the-sender]

Go to **WP Mail SMTP → Settings** and set:

| Field            | Value                                                 |
| ---------------- | ----------------------------------------------------- |
| From Email       | The mailbox you created, e.g. `wordpress@example.com` |
| Force From Email | **Ticked**                                            |
| From Name        | Your site name                                        |

<Callout type="warn">
  **Force From Email** must be ticked. Without it, plugins that set their own
  sender — contact forms especially — send as an address that does not match the
  authenticated mailbox, and the message is rejected or filtered.
</Callout>

## 3. Configure the mailer [#3-configure-the-mailer]

Choose **Other SMTP**, then enter:

| Field          | Value                  |
| -------------- | ---------------------- |
| SMTP Host      | `mail.webgee.com`      |
| Encryption     | `SSL`                  |
| SMTP Port      | `465`                  |
| Authentication | On                     |
| SMTP Username  | The full email address |
| SMTP Password  | The mailbox password   |

Select **Save Settings**.

If your host blocks port 465, use `TLS` on port `587` instead — both are
supported. See [Email server settings](/en/email/manual-configuration).

## Check it worked [#check-it-worked]

WP Mail SMTP has a built-in test:

1. Go to **WP Mail SMTP → Tools → Email Test**.
2. Enter an address you can check, and select **Send Email**.

A success message plus a delivered email means it is working.

## If the test fails [#if-the-test-fails]

* **`SMTP connect() failed`** — the host or port is wrong. Try `587` with `TLS`.
* **`Authentication failed`** — confirm the username is the **full email
  address**, and the password by signing in to
  [webmail](https://webmail.webgee.com).
* **It sends but still lands in spam** — the sending address does not match the
  domain, or your SPF record is wrong. See
  [SPF records for WebGee hosting](/en/email/what-are-the-correct-spf-records-when-using-webgee-hosting)
  and [Publishing DMARC records](/en/email/publishing-dmarc-records-on-your-cpanel-domain).

## Related [#related]

* [Email server settings](/en/email/manual-configuration)
* [Why am I not able to send mail via my PHP script?](/en/email/why-am-i-not-able-to-send-mail-via-my-php-script-or-application)
* [Why are my emails being marked as spam?](/en/email/why-are-my-emails-being-marked-as-spam)
