Description
In local test mode, if you don't set up a mailgun account, emails get written as JSON to /tmp. This is useful and important for, e.g. verifying an email address to test local uploads.
However, the JSON that gets written is hard to use because the message body is encoded as an array of bytes in decimal:
{"envelope":{"forward_path":["[email protected]"],"reverse_path":"test@localhost"},"message_id":"1c9aeff3-f174-495b-bcca-8062b6fb47c3","message":[83,117,98,106,101,99,116,58,32,80,108,101,97,115,101,32,99,111,110,102,105,114,109,32,121,111,117,114,32,101,109,97,105,108,32,97,100,100,114,101,115,115,13,10,84,111,58,32,60,106,115,104,97,50,64,104,111,102,102,109,97,110,45,97,110,100,114,101,119,115,46,99,111,109,62,13,10,70,114,111,109,58,32,60,116,101,115,116,64,108,111,99,97,108,104,111,115,116,62,13,10,68,97,116,101,58,32,83,117,110,44,32,49,50,32,74,117,108,32,50,48,50,48,32,49,52,58,48,57,58,51,51,32,45,48,55,48,48,13,10,77,73,77,69,45,86,101,114,115,105,111,110,58,32,49,46,48,13,10,77,101,115,115,97,103,101,45,73,68,58,32,60,49,99,57,97,101,102,102,51,45,102,49,55,52,45,52,57,53,98,45,98,99,99,97,45,56,48,54,50,98,54,102,98,52,55,99,51,46,108,101,116,116,114,101,64,108,111,99,97,108,104,111,115,116,62,13,10,13,10,72,101,108,108,111,32,106,115,104,97,50,33,32,87,101,108,99,111,109,101,32,116,111,32,67,114,97,116,101,115,46,105,111,46,32,80,108,101,97,115,101,32,99,108,105,99,107,32,116,104,101,10,108,105,110,107,32,98,101,108,111,119,32,116,111,32,118,101,114,105,102,121,32,121,111,117,114,32,101,109,97,105,108,32,97,100,100,114,101,115,115,46,32,84,104,97,110,107,32,121,111,117,33,10,10,104,116,116,112,115,58,47,47,99,114,97,116,101,115,46,105,111,47,99,111,110,102,105,114,109,47,82,70,113,109,104,77,57,49,110,86,76,55,81,78,83,76,112,101,85,71,119,104,72,114,103,76,13,10]}
It would be more useful to encode this as a string.