Bring Your Own SMTP (Custom SMTP)

This guide explains How to connect SES, SendGrid, Mailgun, or other SMTP providers. so you can complete the TrekMail task with confidence.

Where to configure this: SMTP is set per domain. Open Domains → choose a domain → SMTP to add a custom SMTP profile and use it for that domain. Profiles are reusable across multiple domains — and you can make one your account-wide default so every domain follows it.

Article details

Type, difficulty, plans, and last updated info.

Type
Reference
Difficulty
Intermediate
Plans
Starter · Pro · Agency
Last updated
Jun 20, 2026

TrekMail allows you to use your own SMTP provider (like Amazon SES, SendGrid, or Mailgun) to handle outbound mail. This gives you complete control over your sending reputation and limits.

Who this is for

  • Nano Plan Users: This is required to send outbound mail.
  • High Volume Senders: If you need to send millions of emails cheaper than our plans allow.
  • Developers: connecting to specific delivery pipelines.

How it works

SMTP is configured per domain. Picking a custom provider for a domain tells TrekMail: "When I send an email from this domain — from Webmail or via the TrekMail API — relay it through this external server."

  • Per domain: Each domain points at its own route. You can run one domain on your own provider and another on managed SMTP.
  • Reusable profiles: A custom SMTP connection is saved as a profile on your account. Once saved, you can reuse the same profile across multiple domains instead of re-entering credentials each time.
  • Webmail: Uses the domain's saved credentials to send.
  • Desktop Clients (Outlook): You should usually enter your provider's SMTP settings directly into Outlook, bypassing TrekMail entirely for outbound efficiency.

Configuration Steps

  1. Go to Domains, pick the domain you want to configure, and open its SMTP tab.
  2. Choose a route:
    • Saved SMTP profile — pick an existing profile from the dropdown if you've already added this provider to the account.
    • New custom SMTP profile — add a new provider. Enter the details below, Test the connection, then save and use it.
  3. Enter the details from your provider:
    • Hostname: (e.g., email-smtp.us-east-1.amazonaws.com)
    • Port: (usually 587 for TLS)
    • Encryption: (STARTTLS / SSL/TLS)
    • Username: (API User / SMTP User)
    • Password: (API Key / SMTP Password)
  4. Save the profile to apply it to this domain.

Reuse it across domains

A saved profile is account-wide, so you can select it for any other domain from that domain's SMTP → Saved SMTP profile dropdown — no need to re-enter credentials. Editing a profile updates every domain that uses it.

Two account-wide controls sit under the chosen route on the SMTP tab:

  • Make this the account default — new domains you add start on this route. So if you set a saved profile as the default, every new domain comes up pre-pointed at it.
  • Apply to all domains — a one-time switch of every domain in the account to this route (with a confirmation prompt). Use it to move your whole account onto one provider at once.

Provider Examples

Amazon SES

  • Host: email-smtp.[region].amazonaws.com
  • Port: 587 (STARTTLS)
  • Username: SES SMTP Username (Not the IAM User Access Key)
  • Password: SES SMTP Password (Not the IAM Secret Key)

SendGrid

  • Host: smtp.sendgrid.net
  • Port: 587
  • Username: apikey (Literally the string "apikey")
  • Password: Your actual SendGrid API Key starting with SG...

Mailgun

  • Host: smtp.mailgun.org
  • Port: 587
  • Username: postmaster@your-domain.com
  • Password: The SMTP password found in Domain Settings.

SPF & DMARC Considerations

Important: When using an external SMTP provider, your SPF record must authorize that provider — not just TrekMail. Otherwise, recipients may see SPF failures.

If you use Custom SMTP (e.g., SendGrid, Mailgun, SES):

  1. Add their SPF include to your domain's SPF record. Example:

    v=spf1 include:spf.trekmail.net include:sendgrid.net -all
    
  2. DKIM still signs via TrekMail unless you configure your provider's DKIM keys separately.

  3. DMARC alignment: If SPF fails (because the external server isn't in your SPF), DMARC can still pass via DKIM. However, for best deliverability, ensure both SPF and DKIM align.

Recommendation: For guaranteed SPF/DMARC alignment with zero configuration, use Managed TrekMail SMTP on a paid plan. TrekMail handles all authentication automatically.

Common mistakes

  • Symptom: "Connection Refused".
    • Cause: Using port 25 (often blocked). Use 587.
  • Symptom: "Auth Failed" with AWS SES.
    • Cause: Using the IAM User Access Key instead of the SMTP credentials generated in the SES console. They are different.
  • Symptom: SPF failures in DMARC reports.
    • Cause: Your SPF record doesn't include the external provider. Add their SPF include mechanism.
    • Note: If DKIM passes, DMARC may still pass. Check your DMARC reports for alignment details.
  • Symptom: A domain's sending route changed after deleting a custom SMTP profile.
    • Cause: Profiles are reusable across domains, so deleting one reassigns every domain that was using it. Those domains fall back to your account default route (managed SMTP on paid plans, or whatever you set as the default). If the deleted profile was the account default, the default itself resets to your plan baseline. On a Nano plan (which does not include managed sending), domains left without a working profile will pause outbound mail until you add a new profile or upgrade.

Related articles

Jump to nearby guides that continue the workflow.

We use cookies for essential functionality. No ads, no ad tracking.

Sign in to TrekMail

Access your dashboard, mailboxes and DNS.

or
or

Reset email sent

If an account exists for this email, we've sent password reset instructions.

By continuing, you agree to TrekMail's Terms and Privacy Policy.