sj26 / mailcatcher

Catches mail and serves it through a dream.
http://mailcatcher.me
MIT License
6.3k stars 575 forks source link

Missing "source" field in the response payload when calling api endpoint /messages/:id.json #449

Closed patrik-cien10 closed 3 years ago

patrik-cien10 commented 3 years ago

I am not sure if it was whether intentional or not however the new release of mailcatcher is no longer showing the field "source" in the response payload when calling api endpoint /messages/:id.json.

When running the latest docker image the response payload looks like

{
   "id":1,
   "sender":"<help@sender.com>",
   "recipients":["<foo@recipients.com>"],
   "subject":"Subject",
   "size":"66406",
   "type":"multipart/alternative",
   "created_at":"2021-03-02T18:11:58+00:00",
   "formats":["source", "html", "plain"],
   "attachments":[]
}
sj26 commented 3 years ago

Yes this is intentional. The message source can contain characters which cannot be represented by json, and was not used by the MailCatcher UI.

Please use the source URL to obtain the source:

# text/plain
/messages/:id.source

# message/rfc822
/messages/:id.eml