Mailgun
Configuration
The configuration steps are explained in the mailgun configuration page.
Usage
1. When configured with
{
"api_key": "key-3ax6xnjp29jd6fds4gc373sgvjxteol0",
"domain": "example.com",
"region": "us"
}
2. With a channel token
{
"address": "dan@example.com",
"name": "Dan"
}
3. With Broadcast
{
"action_url": "https://example.com",
"category": "example",
"content": "Hello, World!",
"custom_attributes": {},
"id": "d1b3b3b3-3b3b-3b3b-3b3b-3b3b3b3b3b3b",
"overrides": {},
"recipients": [
{
"custom_attributes": {
"plan": "enterprise",
"preferred_pronoun": "They",
"pricing_version": "v10"
},
"email": "test@example.com",
"external_id": "83d987a-83fd034",
"first_name": "Person",
"last_name": "Doe",
"phone_numbers": [
"+1 5005550001"
]
}
],
"title": "Hello, World!",
"topic": "example"
}
The channel handler triggers a HTTP request
POST https://api.mailgun.net/v3/example.com/messages
With payload
--8e00a5da3d83229ce3ed82d8cdb26e550f3317bf1def4737b2959133fac0
Content-Disposition: form-data; name="from"
hello@magicbell-notifications.com
--8e00a5da3d83229ce3ed82d8cdb26e550f3317bf1def4737b2959133fac0
Content-Disposition: form-data; name="to"
dan@example.com
--8e00a5da3d83229ce3ed82d8cdb26e550f3317bf1def4737b2959133fac0
Content-Disposition: form-data; name="subject"
Hello, World!
--8e00a5da3d83229ce3ed82d8cdb26e550f3317bf1def4737b2959133fac0
Content-Disposition: form-data; name="html"
Hello, World!
--8e00a5da3d83229ce3ed82d8cdb26e550f3317bf1def4737b2959133fac0--