Zip Component, Email Component, Encryption Component ActiveX Control for Zip Compression .NET Components for ASP.NET
ActiveX and .NET Components for Zip Compression, Encryption, Email, XML, S/MIME, HTML Email, Character Encoding, Digital Certificates, FTP, and more ASP Email ActiveX Component

Index of Chilkat Blog Posts

October 15, 2007

SMTP SSL Clarification

I’m working with your E-mail ActiveX Component.
I have some problems when I try to send an email over SSL/TLS communication. I read documentation online and I have understood that setting true the property "SmtpSSL" of ChilkatMailMan2 isn’t enough: do I have to set true the property "StartTLS" too ? When I list properties of your component I don’t find "StartTLS", why ? Have I an old version of your component ?

When you are licensed for a Chilkat component, the new version upgrades are always free. Therefore, I would always recommend updating to the latest version if you are having a problem, and you are using a version that is more than six months old. It’s wise to keep your old version just in case you need to revert back ( I would recommend that with any software…), but your existing unlock code should work with the new version.

The mailman.SmtpSsl property and the mailman.StartTLS property are mutually exclusive: if you set one to True, the other should be False. If SmtpSsl is used for implicit SSL — meaning that the initial connection to the SMTP server is SSL. Typically this is on port 465. Therefore, you would also want to set the mailman.SmtpPort property = 465. The mailman.StartTLS property is used for explicit SSL. It is called "explicit" because the initial connection to the SMTP server is unencrypted, and uses the standard SMTP port 21. After connected, the client issues a "STARTTLS" command to explicitly convert the connection to SSL/TLS. Your program doesn’t do anything other than set the StartTLS property — the Chilkat component will automatically convert the connection to SSL/TLS internally.

In summary, to use implicit SMTP SSL/TLS, set these properties (syntax may vary with programming language):
mailman.SmtpSsl = True
mailman.StartTLS = False
mailman.SmtpPort = 465

To use explicit SMTP SSL/TLS, set these properties:
mailman.SmtpSsl = False
mailman.StartTLS = True
mailman.SmtpPort = 21 (This is not really necessary because 21 is the default SMTP port)

All other coding is identical. Using SSL with any Chilkat component is only a matter of setting the properties…

Privacy Statement. Copyright 2000-2011 Chilkat Software, Inc. All rights reserved.
Send feedback to

Components for Microsoft Windows XP, 2000, 2003 Server, Vista, Windows 7, and Windows 95/98/NT4.