Skip to main content

Portal-Mailgun

Portal guide to connect Mailgun account

QA avatar
Written by QA
Updated this week

A concise, step‑by‑step guide to connect Mailgun to Portal so you can send Portal emails from your own address and customize the templates.

  • What you need

    • A Portal account with access to Settings → Customization and the Apps tab.

    • A Mailgun account. For custom domains, you need Starter or Standard (free plan can only send to manually verified recipients).

    • A verified Mailgun sending domain (DNS/SPF/DKIM set up) and an authorized From address.

    • Your Mailgun API Key, Webhook Signing Key, and Account/Domain details.

    Templates you can customize: Key is Ready and Door Code Changed.


Quick Start

  1. Enable Portal email notifications

    Go to Settings → Customization → Key Notifications and ensure Email is enabled.

  2. Open the Apps section

    From Settings → Customization, click the info icon near Email and choose Show Apps, or go directly to the Apps tab and search for Mailgun.

  3. Configure Mailgun

    In Apps → Mailgun, click View Integration and enter:

    • Account / Domain information

    • API Key

    • Webhook Signing Key

      Click Save to connect.

  4. Sync templates

    Open the Templates tab. You’ll see two defaults: Key is Ready and Door Code Changed.

    • Create matching templates in Mailgun using the variables shown in Portal (variable names are case‑sensitive).

    • When Portal detects matching templates, you’ll see Synced and Ready to Use.

    • Click Sync Templates any time you update variables or content.

  5. Send via Mailgun

    In Keys, create a key (or trigger a flow that sends an email). If Mailgun is connected and templates are synced, Portal will send via your Mailgun domain.

    • Delivery has a ~1‑minute tolerance, and timestamps follow the Portal timezone.

  • Fallback: If Mailgun isn’t connected, Portal uses its default mailing service.


Expected Behavior

  • From address & branding come from your Mailgun domain once connected.

  • Two template hooks are supported: Key is Ready and Door Code Changed.

  • Template verification shows Synced and Ready to Use when names/variables match.

  • Delivery timing: allow up to ~1 minute for email arrival.


Edge Cases & Errors

  • Invalid API Key / Webhook Signing Key

    You’ll see an error and the integration won’t save/validate. Re‑check your values and try again.

  • Unverified or free‑plan domain

    Free plan cannot use custom domains for general sending; it’s limited to manually verified recipients. Upgrade to Starter/Standard and verify your domain.

  • Template mismatch

    If template names or variables don’t match what Portal expects, sync will fail or placeholders may render incorrectly. Mirror variable names exactly as shown in Portal’s Templates tab.

  • Revoked/rotated credentials

    If the API/Webhook key is rotated in Mailgun, Portal’s integration may break. Update the keys in Apps → Mailgun.


Troubleshooting

Emails aren’t arriving.

  • Confirm Settings → Customization → Email is enabled.

  • Check Apps → Mailgun status and re‑save keys.

  • Ensure your Mailgun domain is verified (SPF/DKIM).

  • Verify templates show Synced and Ready to Use.

  • Review Mailgun logs for bounces, blocks, or suppression.

  • Allow ~1 minute for delivery; then refresh your inbox (and spam folder).

Templates don’t sync.

  • Template names and variables must exactly match what Portal displays.

  • Click Sync Templates after any change.

  • Avoid extra whitespace or casing differences.

We’re on the free Mailgun plan but need to email guests.

  • Free plan can’t use custom domains broadly—upgrade to Starter or Standard.


Security Best Practices

  • Treat the API Key and Webhook Signing Key like passwords.

  • Rotate credentials periodically and when staff change roles.

  • Restrict who can view or edit Apps → Mailgun settings.

  • Do not paste keys into chats, tickets, or screenshots.


FAQs

Q: Which templates are supported?

A: Key is Ready and Door Code Changed.

Q: Where do I find the variables to use in Mailgun?

A: In Portal’s Templates tab—copy names exactly (case‑sensitive).

Q: When guest recive the Mailgun email?

A: As soon as the key is issued.

Q: What happens if Mailgun isn’t connected?

A: Portal falls back to its default mailing service.

Q: Can I set different From addresses per property?

A: Use separate verified domains/From addresses in Mailgun and configure per property as needed in Portal.

Did this answer your question?