TrekMail TrekMail

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.

Article details

Type, difficulty, plans, and last updated info.

Type
Reference
Difficulty
Intermediate
Plans
Starter · Pro · Agency
Last updated
Apr 16, 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

This setting tells TrekMail: "When I send an email from Webmail or via the TrekMail API, relay it through this external server."

  • Webmail: Uses these 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 SMTP Settings in the sidebar.
  2. Select Bring Your Own SMTP.
  3. Enter the details from your provider:
    • Hostname: (e.g., email-smtp.us-east-1.amazonaws.com)
    • Port: (usually 587 for TLS)
    • Username: (API User / SMTP User)
    • Password: (API Key / SMTP Password)
  4. Click Save Configuration.

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: Emails stop sending after deleting a custom SMTP connection.
    • Cause: If you delete your last custom SMTP connection, TrekMail automatically switches your account back to Managed SMTP. If you are on a Nano plan (which does not include managed sending), outbound email will be paused until you add a new custom connection or upgrade.

Related articles

Jump to nearby guides that continue the workflow.

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

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.