Check out the sample code below to see just how easy it is to use the SSL
plug-in to SSL enable EasyMail .Net Edition. The sample code on this page
demonstrates SSL enabling the SMTP component however the SSL plug-in can be
used in exactly the same way with the POP3 and IMAP4 components of EasyMail
.Net Edition.
| Sample Notes | | This sample shows how to use the SSL plug-in to enabel SSL communications with the EasyMail .Net Edition SMTP
component. The highlighted code is the only extra code required to support SSL.
As the example illustrates, all that is necessary to SSL enable the SMTP
component is to create an instance of the SSL class and pass it to the Connect()
method of the SMTP object. The SSL plug-in also supports client and server certificates as well as
certificate management and enumeration functions. See the documentation for more information. |
SMTP objSMTP = new SMTP("mail.domain.com");
SSL objSSL = new SSL(); objSMTP.Connect(objSSL.GetInterface());
EmailMessage objMessage = new EmailMessage( "recipient@domain.com", "sender@domain.com", "Subject", "Body text", BodyPartFormat.Plain); objSMTP.Send(objMessage); objSMTP.Disconnect();
|