Skip to main content
Ce guide de configuration est si vous avez déjà Mailgun et souhaitez l’intégrer avec OneSignal. Si vous n’avez pas de compte Mailgun, vous pouvez utiliser OneSignal Email à la place.

Exigences


Setup

1. Add a new domain in Mailgun

Skip this step if your domain is already set up in the US region.
  1. Go to the Domains page in the Mailgun dashboard.
  1. Click Add new domain.
  1. Enter a subdomain (e.g., mail.yourdomain.com) and ensure the region is US.

2. Verify DNS settings

Mailgun provides the following DNS records:
  • 2 TXT (SPF & DKIM)
  • 2 MX
  • 1 CNAME
Update these in your DNS provider. Propagation may take up to 48 hours. Mailgun will notify you via email once verified. To verify:
  • Go to Mailgun > Sending > Domain Settings > Your Domain > DNS Records
  • Look for green checkmarks next to each record
If CNAME is not set correctly, email click, open, and unsubscribe tracking will not work.

3. Set up SMTP credentials

  1. Go to Sending > Domain Settings > SMTP credentials in Mailgun.
  1. Click Add new SMTP user.
  1. Set a login name and save the credentials.
  1. Click the copy icon to save the password securely.

4. Get a Mailgun API key

  1. In the Mailgun dashboard, scroll to the bottom and click API Keys.
  1. Click Add new key
  1. Name the key and click Create Key.
  1. Copy the generated API key and save it securely.

5. Configure Mailgun in OneSignal

  1. In OneSignal, go to Settings > Platforms > Email and choose Mailgun.
  1. Select Mailgun as the provider.
  1. Enter:
  1. Set default sender name and from email address.

6. Add OneSignal webhooks to Mailgun

Navigate to Mailgun > Sending > Webhooks > Your Domain > Webhooks and add:
https://onesignal.com/email/hooks/mailgun

7. Change tracking protocol to HTTPS

Ensure recipients are directed to secure URLs.
  1. Go to your domain settings in Mailgun.
  2. Under Tracking > Tracking Protocol, change from HTTP to HTTPS.

8. Send a test email

  1. Go to OneSignal > Messages > Email, click New Email.
  2. Add a subject, click Send Test Email, input your email, and hit Send Test Message.
You should receive the test email shortly.

Troubleshooting

See our Email FAQ
Besoin d’aide ?Discutez avec notre équipe d’assistance ou envoyez un e-mail à support@onesignal.comVeuillez inclure :
  • Les détails du problème que vous rencontrez et les étapes de reproduction si disponibles
  • Votre OneSignal App ID
  • L’External ID ou le Subscription ID le cas échéant
  • L’URL du message que vous avez testé dans le OneSignal Dashboard le cas échéant
  • Tous les journaux ou messages d’erreur pertinents
Nous serons ravis de vous aider !

Email setup complete! Next steps: