Sicos1977 / MsgKit

A .NET library to make MSG files without the need for Outlook
199 stars 55 forks source link

Remove ArgumentNullException If No ContentId #112

Closed jamesjohnmcguire closed 12 months ago

jamesjohnmcguire commented 12 months ago

This removes the intentional throwing of ArgumentNullException, when the Attachment type is inline, but there is no ContentId. In my review of https://www.rfc-editor.org/rfc/rfc3801.txt, there were numerous examples of message/disposition-notification sections without a ContentId. In my own testing, setting attachments without a ContentId, with out throwing this exception, the email went on later to be seemingly parsed just fine.

That's all for now.

Sicos1977 commented 12 months ago

I'm not going to merge this one, a content id is needed to match it with the html so that the image can be shown online. Otherwise it is just a normal attachment and you then don't set the inline flag.