Use your own Mailgun account to deliver notifications to your users via Engagespot. For this you need a Mailgun account, and few other credentials from Mailgun.
Each provider is identified by a unique identifier. Unique identifier of Mailgun provider is
Enabling Mailgun Provider
To enable Mailgun provider, login to your Engagespot dashboard, goto Channels -> Email and enable Mailgun Provider.
Mailgun email provider uses
Mailgun Provider Configurations.
Mailgun Provider requires the following configurations.
|apiKey||Your Mailgun API Key||Yes||21b20a854e3df1ac46cb3aa2b9c6fd314|
|region||Region of your Mailgun account||Yes||It should be either US or EU|
|domain||Your registered Mailgun Domain||Yes||sandboxb9e650f115fc4f55beer32b60c33fc98.mailgun.org|
|fromEmail||From email address||Yes||[email protected]|
How we send email via Mailgun?
We simply use Mailgun API to deliver your notifications. By default, if you donot override anything, we'll consider your
notification.title as the email subject, a combination of your
notification.message as your email's body (Plain text), and if you have specified
notification.url, we will add a default button to your email with Click Here label.
Mailgun provider allows you to override all the above configurations (and you can specify several more options) while sending a notification through Engagespot API, using the
To override the configurations, you must supply them via
override.mailgun parameter of the above API. Within the
override parameter, you can supply any parameter that we'll directly pass to Mailgun
/v3/mail/send API See doc. This makes sure you can use the complete features of Mailgun API while still using Engagespot to control your notifications!
"title": "Anand commented on your photo",
"message": "Hey Steve, you're looking cool 😎. Who took this photo?",
"recipients": ["[email protected]"],
"subject": "Hey, I'm overriding the subject",
"html": "I want more content in my email <b>notification</b>",
"whatever": "keys and values you pass here will be directly sent to Mailgun's Send API 🎉"
Within the override object of a provider, there is a
_config property where you can override the default configurations defined in Engagespot dashboard for that provider. This property will be removed before merging the override object with providers API.