Use Mailgun with GetFluxly

Connect Mailgun to GetFluxly and run behavior-triggered lifecycle email through one of the most established sending infrastructures on the market. GetFluxly captures product events, builds unified customer profiles, and triggers automations based on your rules Mailgun handles the actual delivery, DKIM signing, and per-domain suppression. Your sender reputation stays in your Mailgun account.

What you ship after this guide. A verified Mailgun domain with SPF, DKIM, and DMARC, domain-scoped SMTP credentials, a Mailgun webhook feeding bounces and complaints into GetFluxly, and a working test send.

When to use Mailgun

Pick Mailgun when you want a battle-tested ESP with strong deliverability features (per-domain suppression, granular tagging, EU data residency) and you're comfortable working at the SMTP layer. Mailgun pairs especially well with EU-based SaaS that need to keep mail data inside the EU region. The setup takes a couple more steps than Resend but unlocks more granular controls.

Requirements before connecting

A Mailgun account, a domain you can publish DNS records on, and domain-scoped SMTP credentials with the send scope. On the GetFluxly side: a project, a workspace API key (gf_live_…), and access to Settings → Email providers.

Verify your sending domain

In the Mailgun dashboard, open Sending → Domains → Add New Domain. Pick a region (US or EU, match the region where your audience reads mail), enter the apex domain, and let Mailgun issue the DNS records for you. Status flips to Active once the records propagate.

Add SPF, DKIM, and DMARC

These records live on your domain's DNS, not on GetFluxly. They tell receiving mailboxes that Mailgun is allowed to send on your behalf and what to do when alignment fails.

SPF

Type:   TXT
Host:   yourdomain.com
Value:  v=spf1 include:mailgun.org -all

DKIM

Mailgun issues a DKIM TXT record with a long public key. Copy the host and value exactly as Mailgun displays them.

Type:   TXT
Host:   k1._domainkey.yourdomain.com
Value:  <DKIM public key, copy from Mailgun>

DMARC

Type:   TXT
Host:   _dmarc.yourdomain.com
Value:  v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com; fo=1
These records protect your domain. Publish them at the DNS for the domain you send from. Nothing goes on getfluxly.com. GetFluxly never appears in your From: header.

Get SMTP credentials

In Mailgun, open Sending → Domain settings → SMTP credentials for the domain you want to send from. Copy the SMTP login (it looks like postmaster@mg.yourdomain.com) and click Reset password to mint a fresh one Mailgun won't show an existing password again.

The host is smtp.mailgun.org for US domains or smtp.eu.mailgun.org for EU domains. Port 587 with STARTTLS is the default; 465 with implicit TLS works too if your network blocks 587. If both are blocked, port 2525 with STARTTLS is the documented fallback.

Connect Mailgun in GetFluxly

Open Settings → Email providers, click Add provider, and choose Custom SMTP. Fill in the Mailgun-specific values:

FieldMailgun value
display_nameMailgun Production
from_emailhello@yourdomain.com
from_nameAcme
smtp_hostsmtp.mailgun.org (US) / smtp.eu.mailgun.org (EU)
smtp_port587
smtp_securestarttls
usernamepostmaster@mg.yourdomain.com
passwordThe SMTP password from Mailgun.
curl -X POST https://api.getfluxly.com/v1/projects/PROJECT_ID/email-providers \
  -H "Authorization: Bearer gf_live_REPLACE_ME" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "smtp",
    "display_name": "Mailgun Production",
    "from_email": "hello@yourdomain.com",
    "from_name": "Acme",
    "smtp_host": "smtp.mailgun.org",
    "smtp_port": 587,
    "smtp_secure": "starttls",
    "username": "postmaster@mg.yourdomain.com",
    "password": "..."
  }'

Handle bounces and complaints

Mailgun webhooks deliver bounce, complaint, and delivery events. Wire them to GetFluxly so a hard bounce or complaint immediately suppresses the recipient from future sends.

  1. In GetFluxly, copy the project webhook URL from Settings → Webhooks → Mailgun, it looks like https://api.getfluxly.com/v1/webhooks/mailgun/<project_id>.
  2. In Mailgun, open Sending → Webhooks for the domain and add the URL.
  3. Subscribe to permanent_fail, complained, and delivered at minimum. GetFluxly verifies each request with your Mailgun signing key before any suppression list update.

Test your first lifecycle email

Hit the verify endpoint to dispatch a single message through Mailgun. If it lands and your domain reputation isn't blocking it, you're wired up.

curl -X POST https://api.getfluxly.com/v1/email-providers/PROVIDER_ID/test \
  -H "Authorization: Bearer gf_live_REPLACE_ME" \
  -H "Content-Type: application/json" \
  -d '{ "to": "you@yourdomain.com" }'

Common errors

Connection timeout / refused. Almost always wrong host or port, occasionally an egress firewall. Try 2525 with STARTTLS as a fallback Mailgun supports it specifically for environments where 25, 587, and 465 are blocked.

Authentication failed. The SMTP password was rotated in the Mailgun dashboard since the GetFluxly record was created. Reset the password in Mailgun, copy the new value, and update the provider record.

EU/US region mismatch. An EU-region domain on smtp.mailgun.org (or vice versa) returns a domain not found error. Match the host to the region where you verified the domain.

Mail going to spam. Confirm the DMARC record is published on _dmarc.yourdomain.com and ramp send volume gradually over the first two weeks. Cold-domain ramps matter more than any individual content tweak.

FAQ

Does GetFluxly charge extra to send through Mailgun?

No. GetFluxly does not bill per email. Mailgun pricing applies as if you were sending directly. GetFluxly handles segmentation, automation, profiles, and tracking on top of the Mailgun send path with no per-message markup.

US versus EU Mailgun region, does GetFluxly support both?

Yes. The SMTP host you configure in GetFluxly determines which region the message goes through: smtp.mailgun.org for US domains and smtp.eu.mailgun.org for EU domains. Your verified domain region in the Mailgun dashboard must match the host you use.

Should I send through SMTP or the Mailgun HTTP API?

GetFluxly currently dispatches via Mailgun's SMTP relay, which is the same wire path the Mailgun HTTP API uses internally. You get full DKIM, per-domain suppression, and webhooks. A dedicated HTTP-API connector (with batch sends and tagging) is on the GetFluxly roadmap.

Do I need a dedicated Mailgun account for lifecycle email?

No. You can connect a single Mailgun account to multiple GetFluxly projects. Use one set of SMTP credentials per environment (dev, staging, production) so revoking a credential takes down a single environment without affecting the others.

How do I track Mailgun bounces and complaints in GetFluxly?

GetFluxly exposes a project-scoped webhook URL for Mailgun. Add it as a webhook subscription in Sending → Webhooks and select the bounce, complaint, and delivered events. GetFluxly verifies each request with your Mailgun signing key before any record updates the suppression list.

Why does port 587 sometimes fail on hosting platforms?

Some cloud providers block outbound port 587 by default. Mailgun also exposes port 2525 with STARTTLS as a workaround, it's the same protocol, different port. Switch to 2525 in the GetFluxly provider record and retry the verify endpoint.