Parsing message with empty address as '<>'
This commit is contained in:
parent
15c1d7bc24
commit
e02c7c7f06
|
@ -5,7 +5,7 @@ Changelog [format](http://keepachangelog.com/en/1.0.0/)
|
|||
## Unreleased
|
||||
|
||||
### Fixed
|
||||
* GODT-752 Parsing message with empty CC.
|
||||
* GODT-752 Parsing message with empty addresses.
|
||||
* GODT-752 Parsing non-utf8 multipart/alternative message.
|
||||
* GODT-752 Parsing message with duplicate charset parameter.
|
||||
|
||||
|
|
|
@ -152,7 +152,7 @@ func parseAddressComment(raw string) string {
|
|||
}
|
||||
|
||||
func parseAddressList(val string) (addrs []*mail.Address, err error) {
|
||||
if val == "" {
|
||||
if val == "" || val == "<>" {
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -224,8 +224,8 @@ func TestParseTextPlainWithPlainAttachment(t *testing.T) {
|
|||
assert.Equal(t, readerToString(attReaders[0]), "attachment")
|
||||
}
|
||||
|
||||
func TestParseTextPlainEmptyCC(t *testing.T) {
|
||||
f := getFileReader("text_plain_empty_cc.eml")
|
||||
func TestParseTextPlainEmptyAddresses(t *testing.T) {
|
||||
f := getFileReader("text_plain_empty_addresses.eml")
|
||||
|
||||
m, _, plainBody, attReaders, err := Parse(f, "", "")
|
||||
require.NoError(t, err)
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
From: Sender <sender@pm.me>
|
||||
To: Receiver <receiver@pm.me>
|
||||
CC:
|
||||
Reply-To: <>
|
||||
|
||||
body
|
Loading…
Reference in New Issue