Menu

C# send email using implicit ssl

Araz Farhang Dareshuri

How to send System.Net.Mail to an implicit ssl mail server

Sending email to implicit ssl mail servers is impossible because of underlying architecture.

Is there any alternative to send email to implicit ssl servers using .net?

Of Course but you may use the deprecated System.Web.Mail.MailMessage API (and set its "http://schemas.microsoft.com/cdo/configuration/smtpusessl" option, for explicit SSL/TLS):

System.Web.Mail.MailMessage mailMsg = new System.Web.Mail.MailMessage();
mailMsg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpusessl",true);

Another way is to establish a SSL/TLS tunnel to your server and the send normail email without usage of SSL. By using this way, you do the handshaking and transferring to SMTP server using ssl tunnel.

Is there any library to send mail to implicit ssl servers?

Yes, There are several third party libraries which can be used in-order to send mime/smime mails to implicit ssl smtp mail servers.
For example Secure Black Box mail component, Chilkat .net library our MailBee.Net

What is implicit mail server?

As you might know, SMTP is in a way a normal socket communication which transfers specific packets.
The difference between implicit and explicit ssl mail servers relays on handshaking. In implicit smtp communication the whole process in using SSL, including handshaking (usually port 465).
If you secure a normal mail server with Ssl certificate, that will be come implicit, because you are having a security layer over all of transactions

Explicit Mail Server

In explicit mail server, handshaking is not encrypted and is not using Ssl . You connect to a normal SMTP port (usually 25 or 587) in plaintext, then issue the “starttls” command to switch to SSL-mode.

How to Identify if my server is Implicit Mail Server?

There are IANA registered port numbers for secure mail, but some ISPs may use other ports.

IMAP/SSL: 993
POP3/SSL: 995
SMTP/SSL is often offered on port 465, but this is not registered, and is less common since support for explicit SSL is widely supported by SMTP agents.

Support for explicit SSL can be advertised by a server using a protocol-specific negotiation. For example, when a client connects to an SMTP server, and issues the EHLO command, the server will list its capabilities, which might include support for the STARTTLS command.
For more information look at here

Why to use Aegis Implicit Mail?

  1. Firstly AIM (Aegis Implicit Mail) is free and open source library.
  2. It is easy to use
  3. Usage of AIM is exactly like System.Net.Mail, you can easily add implicit mail server support to your existing .net code.
  4. AIM also have extra features, like SMIME support. You can use the same structure for signed and encrypted mails.
  5. Full support of PKI

Related

Wiki: Home
Wiki: SSL VS TLS

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.