Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Processing Emails with poorly formatted attachments #143

Open
jamesjohnmcguire opened this issue Mar 8, 2025 · 0 comments
Open

Processing Emails with poorly formatted attachments #143

jamesjohnmcguire opened this issue Mar 8, 2025 · 0 comments

Comments

@jamesjohnmcguire
Copy link
Contributor

I'm looking for suggestions on how to proceed with the following:

In processing very old email messages, like from 20 years ago or so, such as from Outlook Express stores, I've found that there were a fair amount of attachments hitting the exception in Attachments.cs, at about lines 332 and 367.

        if (isInline && string.IsNullOrWhiteSpace(contentId))
            throw new ArgumentNullException(nameof(contentId),
                "The content id cannot be empty when isInline is set to true");

To initially resolve this, I forked the repo and removed the exception throws. This allows the msg conversion to complete and actually, the attachments seem fine.

Without interfering with the core functionality, I would like a way to continue with the less stringent attachment checking, for older email messages.

I've been using a forked copy of MsgKit for a such long time, but, in the end, I would really, very much, just prefer using the nuget package instead.

This is (hopefully) the only issue keeping me using the nuget package.

Any suggestions on how to proceed are very much welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant