/
Retrieve a stored email
Event(s) created from sending an email with Mailgun will contain a storage.key to use to retrieve the email.
Security
basicAuth
- US Mailgunhttps://api.mailgun.net/v3/domains/{domain_name}/messages/{storage_key}
- EU Mailgunhttps://api.eu.mailgun.net/v3/domains/{domain_name}/messages/{storage_key}
curl -i -X GET \
-u '<username>:<password>' \
'https://api.mailgun.net/v3/domains/{domain_name}/messages/{storage_key}'A 200 response
The unique identifier of the message as defined by RFC-2392
Response
{ "Content-Transfer-Encoding": "7bit", "Content-Type": "multipart/form-data; boundary=----SomeFormBoundaryABC123", "From": "foo.bar@my-domain.com", "Message-Id": "<xxxxxxxxxxxxx.111111111111111@my-domain.com>", "Mime-Version": "1.0", "Subject": "\"Mailgun is awesome\"", "To": "Cool Bar <cool.barr@cool.com>, bar.baz@gmail.com", "X-Mailgun-Tag": "Earth", "sender": "foo.bar@my-domain.com", "recipients": "cool.barr@cool.com, bar.baz@gmail.com", "body-html": "<html>This is some html</html>", "body-plain": "This is some html", "stripped-html": "<html>This is some html</html>", "stripped-text": "This is some html", "stripped-signature": "the signature block stripped from the plain text message (if found)", "message-headers": [ [ … ], [ … ], [ … ], [ … ], [ … ], [ … ], [ … ], [ … ] ], "X-Mailgun-Template-Name": "my-awesome-template", "X-Mailgun-Template-Variables": "{\"name\":\"Foo\",\"phrase\":\"Bar\"}" }