Software in Review

Mail Component for NET

Developer ComponentPro
Category Software Development
Date Added August 28, 2017
Downloads n/a | 4
License Commercial




Editor's rating + + + + +

If you have found a broken link, please contact us

Get Full Version Home Page


Mail Component for NET Review
Reviewed by: Diana on 2018-06-24

.NET E-mail, IMAP, POP3, SMTP & S/MIME Libraries

Ultimate Mail is a suite consisting of MIME, IMAP, POP3, and SMTP components. It adds the capability of receiving, uploading and managing e-mails, and managing mailboxes in your .NET applications. The package also allows you to create, encrypt, sign, and send e-mail messages as well as validate signature. Supports .NET, Xamarin iOS, Android, UWP, MAC, and .NET CF platforms. Written 100% in C# with many advanced optimizations, it offers speed and reliability to your apps.

.NET E-mail Component's Key Features

• Create mail messages
• S/MIME : Encrypt and sign mail messages
• The most reliable MIME parser on the market
• Create mail message containing embedded resources
• Message with read receipt request
• Supports Outlook .MSG and .EML file formats
• Create reply message
• DKIM emails validation and signing

Mail Message Features

• Automatically encode/decode attachments
• Load existing messages
• Save as message
• Decrypt message and validate signature
• Find certificate stores
• Extract attachments and embedded resources
• Supports for iCalendar and vCard

Features of Imap Library

The Ultimate Mail's IMAP API provides developers with everything required to incorporate mail management tasks in an application as listed below:

• Connect to standard IMAP server or secure server over TLS/SSL
• CRAM-MD5, DIGEST-MD5, NTLM, and Kerberos authentication methods
• Download and Manage Email Messages
• Manage Folders
• Download entire or partial messages to a disk file or stream
• Upload messages stored in a file or memory stream
• Copy, delete, purge and list messages
• Move messages between folders
• Mark/unmark message flags
• Create, rename, and delete mailboxes
• Subscribe and unsubscribe mailboxes
• Obtain mailbox information
• Search messages with advanced options
• IMAP API is compliant with RFC 3501, 2683, 2359, 1321, etc.
• Support for .NET Full Framework, Xamarin iOS, Mac, Android, Mono, .NET
CF, and .NET Core, Standard (will be available soon)

Features of Pop3 Library

The POP3 client class simplifies the tasks needed to manage your email messages on a POP3 server. It offers the following features:

• Connect to standard POP3 server or secure POP3 server over TLS/SSL
• List email messages
• Download entire or partial messages to a disk file or stream
• Delete messages
• Purge messages
• Obtain mailbox information
• POP3 API is compliant with RFC 1939, 2449, 1734, 1321, 2195, etc.
• Authenticate securely with APOP, CRAM-MD5, DIGEST-MD5, NTLM, and Kerberos methods
• Support for .NET Full Framework, Xamarin iOS, Mac, Android, Mono, .NET CF, and .NET Core, Standard (will be available soon)

Features of Smtp Library

In addition to supporting IMAP and POP3 protocols. The Ultimate Mail component also offers a comprehensive interface for SMTP to add email sending features in an application as listed below:
• Connect to standard SMTP server or secure SMTP server over TLS/SSL
• Send bulk messages
• Send to relay SMTP server
• Static methods help send emails quickly
• SMTP API is compliant with RFC 2821, 1891, 1893, 1985, 2034, 2197, 2554, 3030, etc.
• Submit to IIS SMTP queue
• Support PIPELINING
• Delivery Status Notification (DSN)
• Obtain mailbox information
• ESMTP authentication with LOGIN, PLAIN, CRAM-MD5, DIGEST-MD5, NTLM, and Kerberos methods

Performance is a Feature
 
Ultimate Mail was built with performance in mind. The library makes use latest .NET socket API update and large buffers to achieve fast network data transportation. In addition, memory footprint is minimized to deliver the best application experience.

Support Many Authentication Methods
 
In addition to basic username/password authentication the library also supports Auto, NTLM, GSSAPI, Digest-MD5, CRAM-MD5, Clear Text, and External authentication methods.

What is Imap?

IMAP (Internet Message Access Protocol) is an application-level protocol for accessing e-mail. It is based on the transport protocol TCP and uses port 143. IMAP provides the user with extensive opportunities to work with mailboxes located on the central server. A mail program that uses this protocol will access the correspondence store on the server as if it were located on the recipient's computer. E-mails can be manipulated from the user's computer (the client) without constantly sending from the server and back files with full content of letters. Usually, SMTP is used to send messages, because the own IMAP send command, called APPEND, is considered "unsuccessful" and "unsafe".

What is POP3?

POP3 (Post Office Protocol Version 3) is a standard application-level Internet protocol used by email clients to receive mail from a remote server over a TCP connection. POP and IMAP (Internet Message Access Protocol) are the most common Internet protocols for extracting mail. Virtually all modern clients and e-mail servers support both standards. The POP protocol was developed in several versions, the current standard is the third version (POP3). Most e-mail service providers (such as Hotmail, Gmail and Yahoo! Mail) also support IMAP and POP3. Previous versions of the protocol (POP, POP2) are obsolete. An alternative protocol for collecting messages from a mail server is IMAP.

What is SMTP?

SMTP (Simple Mail Transfer Protocol) is a widely used network protocol for sending e-mail on TCP / IP networks. SMTP was first described in RFC 821 (1982); The latest update to RFC 5321 (2008) includes a scalable extension - ESMTP (English Extended SMTP). Currently, under the "SMTP protocol", as a rule, its extensions are also implied. The SMTP protocol is designed to send outgoing mail using the TCP port 25. While e-mail servers and other messaging agents use SMTP to send and receive e-mail messages, user-level mail client applications typically use SMTP only to send messages to the mail server for relaying. To receive messages, client applications typically use either POP (Post Office Protocol), or IMAP (Internet Message Access Protocol), or proprietary systems (such as Microsoft Exchange and Lotus Notes / Domino) to access the accounting write your mailbox on the server.

Creating a project using the Mail component

Let's create a simple WPF application using the Mail component
 
 
 
Creating a project using the Mail component

We’ll need to add the necessary links to our project. Therefore, click on "Links" nd select "Add link"
 
 
 
Creating a project using the FTP component

We’ll need to select such links - ComponentPro.Ftp.dll, ComponentPro.Common.dll, omponentPro.FileSystem.dll, and ComponentPro.Network.dll. Which, I remind, are in the Extensions.
 
 
 
Working with the code

You see a section of code that describes the basic methods for working with the Mail component

// Create a new instance of the MailMessage class.
MailMessage msg = new MailMessage();
msg.From.Add("[email protected]");
msg.To.Add("[email protected]");
msg.Subject = "Hello";
msg.BodyText = "How are you?";
// Load a certificate file and encrypt the message.
msg.Sign(new X509Certificate2("mycert.pfx", "mypassword"));


The first method we'll touch after creating the Mail object is the method for initializing the class. It has 4 overloads:
 
 
 
This class represents an e-mail message that can be saved, downloaded, processed, or sent.

Let's look at another example with saving letters:

MailMessage msg = new MailMessage();
msg.From.Add("[email protected]");
msg.To.Add("[email protected]");
msg.Subject = "Hello";
msg.BodyText = "How are you?";
// Save message
msg.Save("c: empmy message.eml");


The MailMessage class provides a set of convenient methods for storing a message in a local file or writing
to a data stream. The following example shows how to create a new mail message and save it to a local
file:

Synchronization and authentication on the IMAP server

To perform authentication on the IMAP server, you can perform the following steps:

1. Add directives into your code to create aliases for existing namespaces and avoid typing full type names. The code looks something like this:

using System;
using System.Text;
using ComponentPro.Net.Mail;


2. Create a new instance of the Imap class.

3. Now you can connect to the IMAP server using the Connect methods. The code looks something like this:

// Create a new instance of the Imap class.
Imap client = new Imap();
// Connect to the server.
client.Connect("myserver");
// Or you can specify the IMAP port
// client.Connect("myserver", 143);


4. Use the user name and password to log on using one of the Authenticate methods. The code looks something like this:
 
// Login to the server.
client.Authenticate("user", "password");

 
5. Do your work, like enumeration of folders, loading / downloading mail messages, etc. The code looks like this:

StringBuilder sb = new StringBuilder();
FolderCollection list = client.ListFolders();
for (int i = 0; i < list.Count; i++)
{
sb.AppendFormat("{0} - {1} ", i + 1, list[i].Name);
}
Console.WriteLine(sb.ToString());


6. After you have completed your work, call the Disconnect method to close the IMAP session.

In the end, we need to get a code that gets a list of folders on the Imap server.

Imap client = new Imap();
client.Connect("myserver");
// client.Connect("myserver", 143);
client.Authenticate("user", "password");
StringBuilder sb = new StringBuilder();
FolderCollection list = client.ListFolders();
for (int i = 0; i < list.Count; i++)
{
sb.AppendFormat("{0} - {1} ", i + 1, list[i].Name);
}
Console.WriteLine(sb.ToString());
client.Disconnect();


Synchronization and authentication on the POP3 server

1. Add directives into your code to create aliases for existing namespaces and avoid entering full type names.
The code looks something like this:

using System;
using System.Text;
using ComponentPro.Net.Mail;


2. Create a new instance of the Pop3 class.

3. Now you can connect to the POP3 server using the Connect methods. The code looks something like this:

// Create a new instance of the Pop3 class.
Pop3 client = new Pop3();
// Connect to the server.
client.Connect("myserver");
// Or you can specify the POP3 port with
// client.Connect("myserver", 110);


4. Use the user name and password to log on using one of the Authenticate methods. The code looks something like this:

// Login to the server.
client.Authenticate("user", "password");


5. Do your job, like enumerating messages, downloading mail messages, etc. The code looks something like this:

StringBuilder sb = new StringBuilder();
Pop3MessageCollection list =
client.ListMessages(Pop3EnvelopeParts.Size | Pop3EnvelopeParts.UniqueId);
for (int i = 0; i < list.Count; i++)
{
sb.AppendFormat("{0} - {1} ", i + 1, list[i].UniqueId);
}
Console.WriteLine(sb.ToString());


6. After completing your work, call the Disconnect method to close the POP3 session

In the end, we need to get a code that gets a list of messages on the POP3 server.

Pop3 client = new Pop3();
client.Connect("myserver");
// client.Connect("myserver", 110);
client.Authenticate("user", "password");
StringBuilder sb = new StringBuilder();
Pop3MessageCollection list =
client.ListMessages(Pop3EnvelopeParts.Size | Pop3EnvelopeParts.UniqueId);
for (int i = 0; i < list.Count; i++)
{
sb.AppendFormat("{0} - {1} ", i + 1, list[i].UniqueId);
}
Console.WriteLine(sb.ToString());
client.Disconnect();


Synchronization and Authentication on an SMTP Server

To perform authentication on an SMTP server, you can simply follow these steps

1. Add directives into your code to create aliases for existing namespaces and avoid typing full type names. The code looks something like this:

using ComponentPro.Net.Mail;

2. Create a new instance of the Smtp class

3. Now you can connect to the SMTP server using the Connect methods. The code looks something like this:

// Create a new instance of the Smtp class.
Smtp client = new Smtp();
// Connect to the server
client.Connect("myserver");
// Or you can specify the SMTP port with
// client.Connect("myserver", 25);


4. Use the user name and password to log on using one of the Authenticate methods. The code looks something like this:

// Login to the server.
client.Authenticate("user", "password");


5. Do your job as creating a new email message and send it, etc. The code looks something like this:

// Create a new mail message.
MailMessage msg = new MailMessage();
msg.Subject = "Test Subject";
msg.BodyText = "Content";
msg.From = "[email protected]";
msg.To = "[email protected]";
//And send it.
client.Send(msg);


6. After the end of your work, call the Disconnect method to close the SMTP session.

At the end, we need to get the code that gets the list of messages on the SMTP server.

Smtp client = new Smtp();
client.Connect("myserver");
// client.Connect("myserver", 25);
client.Authenticate("user", "password");
MailMessage msg = new MailMessage();
msg.Subject = "Test Subject";
msg.BodyText = "Content";
msg.From = "[email protected]";
msg.To = "[email protected]";
client.Send(msg);
client.Disconnect();


Conclusions and recommendations

Mail library has a lot of methods and structures for sending, receiving, loading, encryption-decryption. So in  your application everything will depend on your imagination, since you can do anything with this library. And the support for the basic protocols (POP3, Imap, SMTP) makes the development process even better. The speed and responsiveness of the library on different platforms is encouraging, which means that the codes optimized at all stages of development, and not only in frequently used ones. And the availability of documentation and examples, make the learning process much faster and more efficient.

If you have found a broken link, please contact us

Get Full Version Home Page


Write your comment
Your Name:
Rating:
Comment:
Control:
Please enter the word above
into the Control box.
Featured Product
Mobile Device Lockdown. With SureLock, you can allow only desired applications to run on the device and only admin can access the password protected settings to either modify lockdown configurations or exit the lockdown.
Search

Categories Tree
Operating Systems
Recently Added Developers
Products Archive
«        November 2018        »
MonTueWedThuFriSatSun
 1234
567891011
12131415161718
19202122232425
2627282930 

Copyright © 2008-2017 TheDownloadPlanet, Inc. All Rights Reserved Terms of Use »  Disclaimer »  Privacy Policy »  Our Partners Free software - Pages in the main Google index, Pages in the supplemental Google index and Supplemental Ratio(!less is better!). Click image for more detailed information.