Hello Everyone
`
A message consists of header fields, optionally followed by a message
body
`
However, the net/mail . ReadMessage returns an error when an email does not contain a body.
To demonstrate this I have written a small program (attached) that shows the difference in values returned by mail.ReadMessage when the input email message ends in
1. a 'field' where field is defined as in RFC5322. with focus on the fact that 'field' ends in a single CRLF
2. a body. In this specific case, I have chosen to use an empty body. Email is constructed by appending 2 consecutive CRLFs to the message from (1). The first CRLF is to separate the header from the body and the second to terminate an empty body
Is this a bug in the go standard library?
-Karan