TLS Support - Aspose

Hello Aspose Team,

This is related to TLS support.

We know that Aspose Email component is providing support for TLS protocol using property SmtpClient.SecurityOptions = SecurityOptions.SSLExplicit .

We have few queries related to this.

[1] If user has SMTP server which is TLS “Disabled” and while configuring mail message, developer has explicitly set SmtpClient.SecurityOptions = SecurityOptions.SSLExplicit . OR in other words TLS = true, then in that case will that message failed to deliver OR will it throws exception OR still it delivers successfully to other mail client?

[2] Is there any API exposed by Aspose to check whether configured SMTP server has TLS enabled OR not ? So that while creating mail message we can check that first hand and then set SmtpClient.SecurityOptions = SecurityOptions.SSLExplicit property accordingly.

Hi Ashpak,


Thank you for writing to Aspose Support team.

1. In such case, the API will raise exception as it will not be able to communicate via the TLS option specified.

2. For SmtpClient, you can use the CredentialsByHostClient.GetCapabilities() method that will contain STARTTLS string in response array, showing that TLS is enabled or not.

Please feel free to write to us if you have any further query.