mailpit unofficial
GET/view/{ID}.html

Render message HTML part

Renders just the message's HTML part which can be used for UI integration testing. Attached inline images are modified to link to the API provided they exist. Note that is the message does not contain a HTML part then an 404 error is returned.

The ID can be set to latest to return the latest message.

2 parameters
IDstringrequired
Message database ID or "latest"
embedstringoptional
If this is route is to be embedded in an iframe, set embed to `1` in the URL to add `target="_blank"` and `rel="noreferrer noopener"` to all links. In addition, a small script will be added to the end of the document to post (postMessage()) the height of the document back to the parent window for optional iframe height resizing. Note that this will also *transform* the message into a full HTML document (if it isn't already), so this option is useful for viewing but not programmatic testing.

3 status codes
200HTML response
400Server error will return with a 400 status code with the error message in the body
404Not found error will return a 404 status code

Error handling

A 400 is returned: Server error will return with a 400 status code with the error message in the body. A 404 is returned: Not found error will return a 404 status code.