KBAISE/ for lovable
Library
Docs

Connect your app to Mailgun

about 8 minBuildingchecked 3d agoOfficial page
The short version

Connect your Mailgun account to Lovable to send automated emails like receipts, alerts, and verification messages directly from your app. You only need your Mailgun API key, your server region, and an already verified domain.

Anyone who needs higher email volume, custom sender domains, or dedicated delivery tracking beyond the built-in email features.

Do this, in order

  1. 1

    Log in to Mailgun, navigate to Account → Security → API keys, and copy or create a Private API key while noting whether your account is in the US or EU.

    Lovable needs this secret key and your exact server region to talk to your Mailgun account.

  2. 2

    Open Connectors in your Lovable dashboard, choose Mailgun, and click Connect.

    This starts the setup flow to save your Mailgun credentials inside your workspace.

  3. 3

    Enter a display name, select your exact account region (US or European Union), paste your Private API key, configure sharing settings, and click Connect.

    Lovable tests your key against Mailgun's servers immediately to confirm the connection works.

  4. 4

    In your project chat, ask Lovable to link to the Mailgun connection and specify your verified sender email address.

    Your project needs permission to use the connection, and Mailgun only allows sending from domains you have verified.

Paste this into your project

Use Mailgun to send a confirmation email from noreply@mydomain.com whenever a user submits the contact form.

Words decoded

Transactional email
Automated messages triggered by user actions, such as password resets, order confirmations, and receipts.
API key
A private password code that lets two software platforms communicate securely with each other.

Where people get stuck

  • Selecting the wrong region during setup; a US key will fail if you leave the default European Union setting selected.
  • Trying to send from a domain that has not yet been verified with DNS records inside Mailgun itself.
  • Expecting the connector to receive incoming webhooks directly from Mailgun, which is not supported.
  • Deleting the connection from workspace settings, which immediately breaks email delivery across all linked projects.

The short version, steps, decoder and prompt on this page are written automatically from Lovable's own documentation and can lag or misread it. The official page is always the authority.