Mailgun
Send emails and manage mailing lists with Mailgun
Configuration
Send Message
Operation
Send Message
Mailgun API Key*
••••••••
Domain*
mg.example.com
From Email*
sender@example.com
To Email*
recipient@example.com
Subject*
Email subject
Text Body
Plain text email body
HTML Body
html
<html><body>HTML email body</body></html>
CC
cc@example.com
BCC
bcc@example.com
Tags
tag1, tag2
Send Message (
mailgun_send_message)Send an email using Mailgun API
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
apiKey | string | Yes | Mailgun API key |
domain | string | Yes | Mailgun domain (e.g., mg.example.com) |
from | string | Yes | Sender email address |
to | string | Yes | Recipient email address (comma-separated for multiple) |
subject | string | Yes | Email subject |
text | string | No | Plain text body of the email |
html | string | No | HTML body of the email |
cc | string | No | CC email address (comma-separated for multiple) |
bcc | string | No | BCC email address (comma-separated for multiple) |
tags | string | No | Tags for the email (comma-separated) |
Output
| Parameter | Type | Description |
|---|---|---|
success | boolean | Whether the message was sent successfully |
id | string | Message ID |
message | string | Response message from Mailgun |
Get Message
Operation
Get Message
Mailgun API Key*
••••••••
Domain*
mg.example.com
Message Key*
Message storage key
Get Message (
mailgun_get_message)Retrieve a stored message by its key
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
apiKey | string | Yes | Mailgun API key |
domain | string | Yes | Mailgun domain |
messageKey | string | Yes | Message storage key |
Output
| Parameter | Type | Description |
|---|---|---|
success | boolean | Whether the request was successful |
recipients | string | Message recipients |
from | string | Sender email |
subject | string | Message subject |
bodyPlain | string | Plain text body |
strippedText | string | Stripped text |
strippedSignature | string | Stripped signature |
bodyHtml | string | HTML body |
strippedHtml | string | Stripped HTML |
attachmentCount | number | Number of attachments |
timestamp | number | Message timestamp |
messageHeaders | json | Message headers |
contentIdMap | json | Content ID map |
List Messages
Operation
List Messages
Mailgun API Key*
••••••••
Domain*
mg.example.com
Event Type
All Events
Limit
100
List Messages (
mailgun_list_messages)List events (logs) for messages sent through Mailgun
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
apiKey | string | Yes | Mailgun API key |
domain | string | Yes | Mailgun domain |
event | string | No | Filter by event type (accepted, delivered, failed, opened, clicked, etc.) |
limit | number | No | Maximum number of events to return (default: 100) |
Output
| Parameter | Type | Description |
|---|---|---|
success | boolean | Whether the request was successful |
items | json | Array of event items |
paging | json | Paging information |
Create Mailing List
Operation
Create Mailing List
Mailgun API Key*
••••••••
List Address*
list@example.com
List Name
My Mailing List
Description
Description of the mailing list
Access Level
Read Only
Create Mailing List (
mailgun_create_mailing_list)Create a new mailing list
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
apiKey | string | Yes | Mailgun API key |
address | string | Yes | Mailing list address (e.g., list@example.com) |
name | string | No | Mailing list name |
description | string | No | Mailing list description |
accessLevel | string | No | Access level: readonly, members, or everyone |
Output
| Parameter | Type | Description |
|---|---|---|
success | boolean | Whether the list was created successfully |
message | string | Response message |
list | json | Created mailing list details |
Get Mailing List
Operation
Get Mailing List
Mailgun API Key*
••••••••
List Address*
list@example.com
Get Mailing List (
mailgun_get_mailing_list)Get details of a mailing list
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
apiKey | string | Yes | Mailgun API key |
address | string | Yes | Mailing list address |
Output
| Parameter | Type | Description |
|---|---|---|
success | boolean | Whether the request was successful |
list | json | Mailing list details |
Add List Member
Operation
Add List Member
Mailgun API Key*
••••••••
List Address*
list@example.com
Member Email*
member@example.com
Member Name
John Doe
Custom Variables
json
{"key": "value"}
Subscribed
Yes
Add List Member (
mailgun_add_list_member)Add a member to a mailing list
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
apiKey | string | Yes | Mailgun API key |
listAddress | string | Yes | Mailing list address |
address | string | Yes | Member email address |
name | string | No | Member name |
vars | string | No | JSON string of custom variables |
subscribed | boolean | No | Whether the member is subscribed |
Output
| Parameter | Type | Description |
|---|---|---|
success | boolean | Whether the member was added successfully |
message | string | Response message |
member | json | Added member details |
List Domains
Operation
List Domains
Mailgun API Key*
••••••••
List Domains (
mailgun_list_domains)List all domains for your Mailgun account
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
apiKey | string | Yes | Mailgun API key |
Output
| Parameter | Type | Description |
|---|---|---|
success | boolean | Whether the request was successful |
totalCount | number | Total number of domains |
items | json | Array of domain objects |
Get Domain
Operation
Get Domain
Mailgun API Key*
••••••••
Domain*
mg.example.com
Get Domain (
mailgun_get_domain)Get details of a specific domain
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
apiKey | string | Yes | Mailgun API key |
domain | string | Yes | Domain name |
Output
| Parameter | Type | Description |
|---|---|---|
success | boolean | Whether the request was successful |
domain | json | Domain details |
Usage Instructions
Integrate Mailgun into your workflow. Send transactional emails, manage mailing lists and members, view domain information, and track email events. Supports text and HTML emails, tags for tracking, and comprehensive list management.
Notes
- Category:
tools - Type:
mailgun