Re: TLS but SSL Error

Giganews Newsgroups
Subject: Re: TLS but SSL Error
Posted by:  Remy Lebeau (re…@lebeausoftware.org)
Date: Thu, 6 Aug 2015

Eric wrote:

> Trying to send Email on port 587.

You must set the UseTLS property to utUseExplicitTLS on ports 25 and 587.
utUseImplicitTLS only works on port 465.

> Destination := ASMTPHost + ':' + IntToStr(LPort);
> Host := ASMTPHost;
> Port := LPort;

Do not set those IOHandler properties manually.  Connect() sets them internally.

> SSLOptions.SSLVersions := [sslvTLSv1, sslvTLSv1_1, sslvTLSv1_2];

Have you tried using those individually instead of together?  Particularly
TLS v1, as some servers do not yet suport TLS v1.1 and v1.2.

> SSLOptions.Mode := sslmUnassigned;

Use sslmClient instead.

> Port := LPort;
> UseTLS := utUseImplicitTLS;

Note that setting UseTLS can implicity set a new Port, so you should set
UseTLS before setting Port if you want to use a specific port value.

--
Remy Lebeau (Indy Team)

Replies

In response to

TLS but SSL Error posted by Eric ten Westenend on Thu, 6 Aug 2015