Mandala
Tools

Mailgun

Send emails and manage mailing lists with Mailgun

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.

Tools

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

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

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

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

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

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

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

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

Notes

  • Category: tools
  • Type: mailgun
Mailgun