Use code "LIGHTHOUSE20" to save 20% on all plans forever. Get it now!

How to Send WordPress Email Through Mailgun

Connect Mailgun to PressedMail over SMTP: per-domain credentials, the right port and a sender that matches the domain.

Cover image for How to Send WordPress Email Through Mailgun

Mailgun’s SMTP credentials belong to a domain, not to your account. Get that one fact right and the rest of the setup is short. This guide connects Mailgun to PressedMail’s WordPress Email settings, so WordPress’s own notifications leave through Mailgun instead of PHP mail.

It covers WordPress’s mail, not your inbox. Reading and writing your own mail is a separate job with a separate connection.

What you need

  • A Mailgun account with a sending domain added to it.
  • SMTP credentials for that domain.
  • PressedMail with a WordPress Email SMTP slot. Free has one. Paid builds have several.

Find the SMTP credentials

Mailgun’s SMTP page says the credentials are set and managed per domain. In the Mailgun dashboard, go to Sending, then Domain Settings, pick your domain from the menu, and open the SMTP Credentials tab. You can also manage them through Mailgun’s HTTP API.

Each domain has its own user name and password. If you send from two domains, you have two sets. Do not mix them: a password made for one domain will not authenticate for another.

The settings

FieldValue
SMTP hostsmtp.mailgun.org
Port587
Connection securityTLS (STARTTLS)
UsernameThe domain’s SMTP user name
PasswordThe domain’s SMTP password

Mailgun’s servers listen on ports 25, 465, 587 and 2525. Port 465 requires a TLS connection from the start, which is PressedMail’s SSL option. Ports 25, 587 and 2525 start unencrypted and can be upgraded with STARTTLS, which is the TLS (STARTTLS) option. Mailgun explains that it offers several ports because some ISPs block or throttle certain ones, and it recommends port 587.

If your host blocks 587, try 2525 with the same STARTTLS setting before you assume the credentials are wrong.

Add it in PressedMail

Open PressedMail, then Settings, then WordPress Email, then SMTP Accounts. On Free, the tab is Mail servers and the button reads Add mail server. Choose Add SMTP account.

The SMTP account form with the Mailgun host and port typed in, with four areas numbered

  1. SMTP host. smtp.mailgun.org.
  2. Port and connection security. 587 with TLS (STARTTLS).
  3. Use SMTP authentication. Leave it on.
  4. Username and password. The domain’s SMTP credentials.

The picture shows a typed host and port from Mailgun’s documentation and nothing saved.

Then set the From email to an address at the domain you added to Mailgun.

Match the sender to the domain

Mailgun’s credentials are per domain, so the From address should sit at that domain. A message from an address at a different domain is a mismatch your provider and the receiver may both object to. If WordPress or a plugin sets another sender, turn on Force the From address on the PressedMail form, which replaces the sender on every message with the one you set. Keep a contact form visitor’s address in Reply-To, because forcing the From would otherwise hide it.

If you run more than one domain, a paid PressedMail build can hold several SMTP accounts and pick the right one from the sender address. The routing guide explains how an account claims an address.

Switch WordPress over to it

Adding the account does not move WordPress’s mail by itself. On a paid build, open the Default SMTP tab and choose PressedMail SMTP.

The Default SMTP tab of WordPress Email with five areas numbered

  1. The tabs. Paid builds show SMTP Accounts, Default SMTP and System Emails. Free shows System Emails and Mail servers.
  2. Add SMTP account. The Free button reads Add mail server.
  3. WordPress default. PHP mail().
  4. PressedMail SMTP. Sends what WordPress, a plugin or a theme sends through the server you set up here. It stays unavailable until you add one.
  5. A note that your PressedMail inboxes are not affected either way.

The picture is from a paid build.

Test it

Press Send Test Email on the form with an address you control, then trigger a real WordPress message such as a password reset. Check the recipient mailbox, including spam. Acceptance by Mailgun does not mean the message reached the inbox, and the SMTP test guide shows how to keep those checks apart.

If PressedMail’s delivery log shows the message went through your Mailgun account and the recipient still sees nothing, look at sender authorization before you change the server settings. The guide to stopping WordPress email going to spam covers it, and the delivery log guide shows what the log records.

If it does not connect

  • Wrong domain credentials. Check that you copied the SMTP credentials from the same domain you send as.
  • A blocked port. Switch from 587 to 2525, or from 25 to 587.
  • The wrong security setting. 465 needs SSL. The others need TLS (STARTTLS).
  • An address Mailgun cannot parse. Mailgun’s page says SMTP sends fail with a parse error when an address fails syntax checks, so look for stray spaces or a display name in the From email field.
  • IP allow lists. Mailgun warns that the IP addresses behind its endpoints change often, so do not lock your firewall to them.

The troubleshooting guide covers the case where the connection test passes and sending still fails.

Common questions

Which port does Mailgun recommend?

  1. It offers 25, 465, 587 and 2525, and says some ISPs block or throttle certain ones.

Where do I find my SMTP password?

In Sending, then Domain Settings, under the SMTP Credentials tab for your domain.

Can one set of credentials work for every domain?

No. SMTP credentials are managed per domain.

Does this send mail from my inbox?

No. This is WordPress’s own mail. Your PressedMail inbox mail goes through the mailbox you connect.

Do I need a paid PressedMail plan?

Free supports one WordPress SMTP server, which is enough for one Mailgun domain. Several servers and sender routing are paid features.

Manage your email inside WordPress

PressedMail Free adds an email client directly to your WordPress dashboard. Connect a compatible IMAP/SMTP mailbox, read and send mail, organize messages, and configure WordPress SMTP.

Download PressedMail Free →

Newsletter

Get useful PressedMail updates.

New releases, setup guidance, and practical ways to handle email in WordPress.

Occasional PressedMail email. Unsubscribe whenever you like.

Choose the plan that fits your WordPress sites.

Paid plans include unlimited accounts and users. Compare Premium and Ultimate features, then choose the site count you need.

Yearly plans are priced by number of sites. Lifetime is a one-time payment covering up to 100 sites.

Starter

For one site

$49/ year
1 Website
  • All current and future Premium features
  • Unlimited email accounts
  • Contacts, calendar, and scheduled email rules
  • Templates, blocks, and signup forms
  • AI tools and phishing detection
  • Layouts, themes, and workspace controls
  • Licensed updates and priority support
  • 10,000 PressedMail AI credits a yearLimited time
Most Popular

Premium

For multiple sites

$89/ year
10 Websites
  • All current and future Premium features
  • Unlimited email accounts
  • Contacts, calendar, and scheduled email rules
  • Templates, blocks, and signup forms
  • AI tools and phishing detection
  • Layouts, themes, and workspace controls
  • Licensed updates and priority support
  • 25,000 PressedMail AI credits a yearLimited time
All Features

Ultimate

For agencies

$169/ year
100 Websites
  • Everything in Premium, plus:
  • Campaigns and shared templates
  • Share inboxes, calendars and contact lists
  • White labelling with a brand theme
  • 50,000 PressedMail AI credits a yearLimited time

What customers say after bringing email into WordPress.

Using PressedMail in your own work? Submit a testimonial

I save hours & it’s easy to use

I have a lot of email accounts, and it’s annoying to manage them through different providers. I needed something better than what was out there, so I built it. I spent the better part of two years making PressedMail the plugin I wanted to use every day, and now I get to share it with everyone else. I added my accounts, automated the cleanup of over 3000 emails, and it’s saved me hours of work.

Robert H. AlexanderFounder - CurbSoftwareCreator of PressedMail

Helps get more clients

As a freelancer I need to manage several clients’ accounts. I installed PressedMail on WordPress on localhost and use it as my main email client. I manage everything for clients from PressedMail. And several clients use PressedMail now after I have set their WordPress instances up.

Gene Piki
  • Email Swiss Army Knife

    We use PressedMail as a value added service for clients and potential clients as a feature of our agency’s offering helping put us ahead of competition. We love the white-labelling feature, automation, and security controls. It also replaces several of the other plugins we used to use and it’s like a small CRM.

    Cyrus M. (InCurb Digital)

  • Fast inbox organization with phishing detection

    PressedMail helps us organize our inboxes fast. We especially like the phishing detection feature.

    John & Andrea

  • One source of truth for every client

    As a VA, I use PressedMail to keep each client’s inbox separate while managing everything from one app. It gives me a single source of truth without mixing client work together.

    Amber, K

  • Teaching and client work stay organized

    I balance teaching with social media marketing clients. PressedMail helps me keep both sides of my work organized in one place.

    J.A. Payo

FAQ

Common questions

Free version

Start with one inbox. Free.

One mailbox for one user, a rich-text composer, custom folders, unlimited email rules, one signature, two themes and one layout. Contacts, calendar, scheduling and AI require a paid plan.

1 account · 1 user · 2 themes · unlimited rules
Roadmap

See what is coming next.

Follow planned work, current progress, and recently completed features.

  1. Planned

    Calendar Sync with External Providers

    Planned. Today calendars and events live in WordPress and do not sync with any outside provider. Two-way sync with Google Calendar, Outlook, iCloud and CalDAV-compatible services is on the roadmap.

  2. Planned

    Dedicated Support

    A higher-touch support channel beyond the current paid Priority Email Support entitlement.

  3. Planned

    Activity Log

    A searchable audit trail of key actions across PressedMail accounts, with per-user and admin views, retention controls, and export.

Bring your working inbox into WordPress.

Compare Premium and Ultimate features, then choose a paid plan for the number of WordPress sites you manage.

How to Send WordPress Email Through Mailgun