You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If MailHog receives messages where the headers aren't in the expected case, then MailHog's interface doesn't display the message properly. For example, if the headers are all lower case (so 'subject' instead of 'Subject'), then the to/from, subject, and HTML message parsing doesn't work as expected.
I saw a few explicit headers are being treated in a case insensitive fashion, but this doesn't extend to all headers, like "From," "To," "Subject," and "Content-Type." I poked around a bit to see about submitting a pull request, but I wasn't sure the preferred way to go about it. I saw various things in the UI are expecting title-cased headers, so maybe it would be simplest to have the server normalize all the values to title-case to minimize the UI changes needed?
If MailHog receives messages where the headers aren't in the expected case, then MailHog's interface doesn't display the message properly. For example, if the headers are all lower case (so 'subject' instead of 'Subject'), then the to/from, subject, and HTML message parsing doesn't work as expected.
Here's a quick example using
mhsendmail
:In the inbox this message shows up as being from
{{ getSender(message) }}
, and contains a blank subject. The actual message shows up like this:If I use the more standard title-case for the headers, then this same test works as expected:
Which shows up as:
I saw a few explicit headers are being treated in a case insensitive fashion, but this doesn't extend to all headers, like "From," "To," "Subject," and "Content-Type." I poked around a bit to see about submitting a pull request, but I wasn't sure the preferred way to go about it. I saw various things in the UI are expecting title-cased headers, so maybe it would be simplest to have the server normalize all the values to title-case to minimize the UI changes needed?
I'm not sure how common this is, but headers should be case insensitive according to the spec. I encountered this since LuaSocket's SMTP client actually does lowercase all the headers before sending.
The text was updated successfully, but these errors were encountered: