MailCore / mailcore2

MailCore 2 provide a simple and asynchronous API to work with e-mail protocols IMAP, POP and SMTP. The API has been redesigned from ground up.
Other
2.59k stars 623 forks source link

[Bug] - Crash when getting `From` value from MCOIMAPMessage Header #1921

Open BhavinBhadani opened 3 years ago

BhavinBhadani commented 3 years ago

Summary

Platform(s)

<iOS>

Happens on Mail Server

<Gmail>

When I am trying to fetch mails then in one of the mail, it crashed due to nil From value of MCOIMAPMessage header. Here is the log of that header (only crashed when I gets this header)

  ▿ Optional<MCOMessageHeader>
  - some : <mailcore::MessageHeader:0x60001b819200
  Message-ID: pftc-om956wchng8f9-fo459zzfftbc1@monarchal.in
  To: [mailcore::Address:0x600035fa06c0 denny@gmail.com <denny@gmail.com>]
  Subject: ZERO AMC demat account with Aditya Birla Money
  From: "Aditya Birla Capital – Stocks & Securities" <newsletter@monarchal.in>
  Reply-To: "Aditya Birla Capital – Stocks & Securities" <newsletter@monarchal.in>
  >

And here is the Log of different header for the same

(lldb) po msg.header.to
▿ Optional<Array<Any>>
   ▿ some : 1 element
      - 0 : mailcore::Address:0x600035fa06c0 denny@gmail.com <denny@gmail.com>

(lldb) po msg.header.from
nil

(lldb) po msg.header.replyTo
nil

Is it because of certain special characters in From and Reply-To?