S22.Imap | NET library component for communicating with IMAP servers

 by   smiley22 C# Version: Current License: MIT

kandi X-RAY | S22.Imap Summary

kandi X-RAY | S22.Imap Summary

S22.Imap is a C# library. S22.Imap has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

A free, easy-to-use and well-documented .NET library component for communicating with IMAP servers
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              S22.Imap has a low active ecosystem.
              It has 183 star(s) with 103 fork(s). There are 25 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 75 open issues and 60 have been closed. On average issues are closed in 239 days. There are 16 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of S22.Imap is current.

            kandi-Quality Quality

              S22.Imap has 0 bugs and 0 code smells.

            kandi-Security Security

              S22.Imap has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              S22.Imap code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              S22.Imap is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              S22.Imap releases are not available. You will need to build from source code and install.
              S22.Imap saves you 120 person hours of effort in developing the same functionality from scratch.
              It has 304 lines of code, 0 functions and 80 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of S22.Imap
            Get all kandi verified functions for this library.

            S22.Imap Key Features

            No Key Features are available at this moment for S22.Imap.

            S22.Imap Examples and Code Snippets

            No Code Snippets are available at this moment for S22.Imap.

            Community Discussions

            QUESTION

            Supporting multiple content encoding in .net Framework 4.6.1 using mailkit
            Asked 2020-Mar-24 at 13:56

            I'm working on building an email client using .net framework 4.6.1, which will fetch emails from a mailbox and display on the email client. Currently I'm using s22.Imap's ImapClient.GetMessage() method to retrieve the email content. It works fine for the attachments and for bodyContent with most default encoding.

            But some of my mails are of type CodePage = 932 and EncodingName = "Japanese (Shift-JIS)". I'm not able to fetch these emails since they throw System.NotSupportedException for most of the BodyEncoding attributes / properties.

            On Searching through the github issues for s22.Imap, there was an issue which was suggesting to use mailkit instead of s22.Imap. I would like to know more about how this encoding part is handled in mailkit. Also would like to know if there is a default way to handle encoding of unknown CodePage types.

            ...

            ANSWER

            Answered 2020-Mar-24 at 13:56

            You can read this blog post that explains what most C# MIME parsers get wrong and why MimeKit can handle multiple charset encodings.

            https://jeffreystedfast.blogspot.com/2013/09/time-for-rant-on-mime-parsers.html https://jeffreystedfast.blogspot.com/2013/08/why-decoding-rfc2047-encoded-headers-is.html

            Since the StackOverflow moderators will likely complain about posting a link, here's a copy & paste of the content:

            Time for a rant on mime parsers...

            Warning: Viewer discretion is advised.

            Where should I begin?

            I guess I should start by saying that I am obsessed with MIME and, in particular, MIME parsers. No, really. I am obsessed. Don't believe me? I've written and/or worked on several MIME parsers at this point. It started off in my college days working on Spruce which had a horrendously bad MIME parser, and so as you read farther along in my rant about shitty MIME parsers, keep in mind: I've been there, I've written a shitty MIME parser.

            As a handful of people are aware, I've recently started implementing a C# MIME parser called MimeKit. As I work on this, I've been searching around on GitHub and Google to see what other MIME parsers exist out there to find out what sort of APIs they provide. I thought perhaps I'll find one that offers a well-designed API that will inspire me. Perhaps, by some miracle, I'd find one that was actually pretty good that I could just contribute to instead of writing my own from scratch (yea, wishful thinking). Instead, all I have found are poorly designed and implemented MIME parsers, many probably belong on the front page of the Daily WTF.

            I guess I'll start with some softballs.

            First, there's the fact that every single one of them were written as System.String parsers. Don't be fooled by the ones claiming to be "stream parsers", because all any of those did was to slap a TextReader on top of the byte stream and start using reader.ReadLine(). What's so bad about that, you ask? For those not familiar with MIME, I'd like for you to take a look at the raw email sources in your inboxes particularly if you have correspondence with anyone outside of the US. Hopefully most of your friends and colleagues are using more-or-less MIME compliant email clients, but I guarantee you'll find at least a few emails with raw 8bit text.

            Now, if the language they were using was C or C++, they might be able to get away with doing this because they'd technically be operating on byte arrays, but with Java and C#, a 'string' is a unicode string. Tell me: how does one get a unicode string from a raw byte array?

            Bingo. You need to know the charset before you can convert those bytes into unicode characters.

            To be fair, there's really no good way of handling raw 8bit text in message headers, but by using a TextReader approach, you are really limiting the possibilities.

            Next up is the ReadLine() approach. One of the 2 early parsers in GMime (pan-mime-parser.c back in the version 0.7 days) used a ReadLine() approach, so I understand the thinking behind this. And really, there's nothing wrong with this approach as far as correctness goes, it's more of a "this can never be fast" complaint. Of the two early parsers in GMime, the pan-mime-parser.c backend was horribly slow compared to the in-memory parser. Of course, that's not very surprising. More surprising to me at the time was that when I wrote GMime's current generation of parser (sometime between v0.7 and v1.0), it was just as fast as the in-memory parser ever was and only ever had up to 4k in a read buffer at any given time. My point is, there are far better approaches than ReadLine() if you want your parser to be reasonably performant... and why wouldn't you want that? Your users definitely want that.

            Okay, now come the more serious problems that I encountered in nearly all of the mime parser libraries I found.

            I think that every single mime parser I've found so far uses the "String.Split()" approach for parsing address headers and/or for parsing parameter lists on headers such as Content-Type and Content-Disposition.

            Here's an example from one C# MIME parser:

            Source https://stackoverflow.com/questions/60825872

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install S22.Imap

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/smiley22/S22.Imap.git

          • CLI

            gh repo clone smiley22/S22.Imap

          • sshUrl

            git@github.com:smiley22/S22.Imap.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link