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
ParameterTypeRequiredDescription
apiKeystringYesMailgun API key
domainstringYesMailgun domain (e.g., mg.example.com)
fromstringYesSender email address
tostringYesRecipient email address (comma-separated for multiple)
subjectstringYesEmail subject
textstringNoPlain text body of the email
htmlstringNoHTML body of the email
ccstringNoCC email address (comma-separated for multiple)
bccstringNoBCC email address (comma-separated for multiple)
tagsstringNoTags for the email (comma-separated)
Output
ParameterTypeDescription
successbooleanWhether the message was sent successfully
idstringMessage ID
messagestringResponse 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
ParameterTypeRequiredDescription
apiKeystringYesMailgun API key
domainstringYesMailgun domain
messageKeystringYesMessage storage key
Output
ParameterTypeDescription
successbooleanWhether the request was successful
recipientsstringMessage recipients
fromstringSender email
subjectstringMessage subject
bodyPlainstringPlain text body
strippedTextstringStripped text
strippedSignaturestringStripped signature
bodyHtmlstringHTML body
strippedHtmlstringStripped HTML
attachmentCountnumberNumber of attachments
timestampnumberMessage timestamp
messageHeadersjsonMessage headers
contentIdMapjsonContent 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
ParameterTypeRequiredDescription
apiKeystringYesMailgun API key
domainstringYesMailgun domain
eventstringNoFilter by event type (accepted, delivered, failed, opened, clicked, etc.)
limitnumberNoMaximum number of events to return (default: 100)
Output
ParameterTypeDescription
successbooleanWhether the request was successful
itemsjsonArray of event items
pagingjsonPaging 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
ParameterTypeRequiredDescription
apiKeystringYesMailgun API key
addressstringYesMailing list address (e.g., list@example.com)
namestringNoMailing list name
descriptionstringNoMailing list description
accessLevelstringNoAccess level: readonly, members, or everyone
Output
ParameterTypeDescription
successbooleanWhether the list was created successfully
messagestringResponse message
listjsonCreated 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
ParameterTypeRequiredDescription
apiKeystringYesMailgun API key
addressstringYesMailing list address
Output
ParameterTypeDescription
successbooleanWhether the request was successful
listjsonMailing 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
ParameterTypeRequiredDescription
apiKeystringYesMailgun API key
listAddressstringYesMailing list address
addressstringYesMember email address
namestringNoMember name
varsstringNoJSON string of custom variables
subscribedbooleanNoWhether the member is subscribed
Output
ParameterTypeDescription
successbooleanWhether the member was added successfully
messagestringResponse message
memberjsonAdded member details

List Domains

Operation
List Domains
Mailgun API Key*
••••••••
List Domains (mailgun_list_domains)

List all domains for your Mailgun account

Input
ParameterTypeRequiredDescription
apiKeystringYesMailgun API key
Output
ParameterTypeDescription
successbooleanWhether the request was successful
totalCountnumberTotal number of domains
itemsjsonArray 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
ParameterTypeRequiredDescription
apiKeystringYesMailgun API key
domainstringYesDomain name
Output
ParameterTypeDescription
successbooleanWhether the request was successful
domainjsonDomain 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