Giter Site home page Giter Site logo

s22.pop3's Introduction

Introduction

This repository contains an easy-to-use and well-documented .NET library component for communicating with and receiving electronic mail from a Post Office Protocol (POP3) server.

Motivation

There's already a plethora of POP3 libraries available for .NET, so it'a not like there is a need for another one. I primarily created this for the fun of it and because writing a POP3 library really is a breeze, when you already have a solid implementation of IMAP with a MIME parser.

Usage & Examples

To use the library add the S22.Pop3.dll assembly to your project references in Visual Studio. Here's a simple example that initializes a new instance of the Pop3Client class and connects to Gmail's POP3 server:

using System;
using S22.Pop3;

namespace Test {
	class Program {
		static void Main(string[] args) {
			/* connect on port 995 using SSL */
			using (Pop3Client Client = new Pop3Client("pop.gmail.com", 995, true))
			{
				Console.WriteLine("We are connected!");
			}
		}
	}
}

Here are a couple of examples of how to use the library. Please also see the documentation for further details on using the classes and methods exposed by the S22.Pop3 namespace.

Features

  • Supports POP over SSL
  • API designed to be very easy to use
  • Allows selectively fetching the headers of mail messages
  • Inherently thread-safe
  • Well documented with lots of example code
  • Free to use in commercial and personal projects (MIT license)

Credits

This library is copyright © 2012 Torben Könke.

License

This library is released under the MIT license.

Bug reports

Please send your bug reports and questions to [email protected] or create a new issue on the GitHub project homepage.

s22.pop3's People

Contributors

smiley22 avatar

Stargazers

Tom-- avatar  avatar  avatar  avatar Dmitrii Evdokimov avatar Active PHOENiX  avatar Albert Willemsen avatar Max Prilutskiy avatar  avatar tobynet avatar  avatar  avatar Giorgi Chakhidze avatar

Watchers

Neustradamus avatar James Cloos avatar Kris Daniels avatar  avatar  avatar Albert Willemsen avatar

Forkers

ramazanaktolu

s22.pop3's Issues

Quoted-printable attachments issue

First, thanks for making this easy-to-use pop3 client :)

QPDecode seems to fail on long strings; see the following message with attachment received from gmail:

Return-Path: <[email protected]>
Received: from TNORRIS-T3600 ([38.97.104.162])
by mx.google.com with ESMTPSA id x8sm3608412qam.2.1969.12.31.16.00.00
(version=TLSv1 cipher=RC4-SHA bits=128/128);
Tue, 24 Sep 2013 13:39:38 -0700 (PDT)
Message-ID: <[email protected]>
MIME-Version: 1.0
From: [email protected]
To: [email protected]
Date: Tue, 24 Sep 2013 13:39:38 -0700 (PDT)
Subject: test message
Content-Type: multipart/mixed;
boundary=--boundary_0_086cc074-7786-4b61-8bd3-146b73370314

----boundary_0_086cc074-7786-4b61-8bd3-146b73370314
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable

test message!
----boundary_0_086cc074-7786-4b61-8bd3-146b73370314
Content-Type: application/octet-stream; name=xml.txt
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment

<portcall><id>XXXX-XXXX-XXXX-XXXX</id><dadeskRef>XXX-XXXXX-X</dad=
eskRef><daType>SDA</daType><invoiceNo>XXX-XXXXXX-X</invoiceNo><in=
[omitted text]</portcall>
----boundary_0_086cc074-7786-4b61-8bd3-146b73370314--

= followed by newline causes an exception and the user ends up with the still-encoded string.

Another minor issue; this example has filename in the Content-Type header instead of the Content-Disposition, which isn't handled.

Problem with characters

When I receive a mail like:

 •  Nacional

Laboral y Seguridad Social
PODER LEGISLATIVO NACIONAL (P.L.N.)
Código Civil y Comercial de la Nación -- Aprobación -- Modificación de las leyes 2637, 17.801, 19.550 (t.o.1984), 20.094, 20.266, 21.342, 24.240, 24.441, 25.248, 26.356 y del Dec. 1798/94 -- Derogación de la leyes 15, 340, 11.357, 13.512, 14.394, 18.248, 19.724, 19.836, 20.276, 23.091, 25.509 y 26.005 -- Norma complementaria del Dec. 191/2011.

LEY 26994

Fecha: 8/10/2014

S22.Pop3 gives me the next:

???  Nacional

Laboral y Seguridad Social
PODER LEGISLATIVO NACIONAL (P.L.N.)
C??digo Civil y Comercial de la Naci??n -- Aprobaci??n -- Modificaci??n de las leyes 2637, 17.801, 19.550 (t.o.1984), 20.094, 20.266, 21.342, 24.240, 24.441, 25.248, 26.356 y del Dec. 1798/94 -- Derogaci??n de la leyes 15, 340, 11.357, 13.512, 14.394, 18.248, 19.724, 19.836, 20.276, 23.091, 25.509 y 26.005 -- Norma complementaria del Dec. 191/2011.

LEY 26994

Fecha: 8/10/2014

DeleteMessage API does not seem to have an impact

Hi,

When calling GetMessage( ) API, specifying delete = true, does not seem to have an impact. Post fetch, messages are still found on the server.

When explicitly calling DeleteMessage( meessagenumber), also does not seem to be deleting the message. Do we need to specifically call any other API to reflect the purge activity?

Used other mail clients like thunderbird/outlook and they deleted as expected. Mail Server that was used for testing it locally is MailEnable. Let me know if you need more details or anything is incorrectly done.

SCRAM-SHA-1(-PLUS) + SCRAM-SHA-224(-PLUS) + SCRAM-SHA-256(-PLUS) + SCRAM-SHA-384(-PLUS) + SCRAM-SHA-512(-PLUS) + SCRAM-SHA3-512(-PLUS) supports

Can you add supports of :

  • SCRAM-SHA-1
  • SCRAM-SHA-1-PLUS
  • SCRAM-SHA-224
  • SCRAM-SHA-224-PLUS
  • SCRAM-SHA-256
  • SCRAM-SHA-256-PLUS
  • SCRAM-SHA-384
  • SCRAM-SHA-384-PLUS
  • SCRAM-SHA-512
  • SCRAM-SHA-512-PLUS
  • SCRAM-SHA3-512
  • SCRAM-SHA3-512-PLUS

"When using the SASL SCRAM mechanism, the SCRAM-SHA-256-PLUS variant SHOULD be preferred over the SCRAM-SHA-256 variant, and SHA-256 variants [RFC7677] SHOULD be preferred over SHA-1 variants [RFC5802]".

https://xmpp.org/extensions/inbox/hash-recommendations.html

-PLUS variants:

LDAP:

  • RFC5803: Lightweight Directory Access Protocol (LDAP) Schema for Storing Salted: Challenge Response Authentication Mechanism (SCRAM) Secrets: https://tools.ietf.org/html/rfc5803

HTTP:

2FA:

IANA:

Linked to:

Mail without body and only attachments gets first attachment in the mail body

When retreiving a mail with no body and only an attachment, the attachment ends up in the body, rather than in the attachment collection.

Header sample :
From: xxxx
To: xxxx
Content-Type: application/zip;
name="xxxx.zip"
Content-Disposition: attachment;
filename="xxxx.zip"
Content-Transfer-Encoding: base64

UEsDBAoA...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.