(01-07-2021, 04:06 PM)luigisic Wrote: Port = 465
UseTLS = utUseImplicitTLS
Just as an FYI, use utUseImplicitTLS only on port 465. For ports 25 and 587, use utUseExplicitTLS instead.
(01-07-2021, 04:06 PM)luigisic Wrote: SSLOptions.SSLVersions = [sslvSSLv2, sslvSSLv3, sslvTLSv1, sslvTLSv1_1, sslvTLSv1_2]
SSL v2.0 and v3.0 are no longer secure, and thus nobody uses them anymore, so you should not be enabling them at all:
Code:
SSLOptions.SSLVersions = [sslvTLSv1, sslvTLSv1_1, sslvTLSv1_2]
And be aware that many servers nowadays are phasing out TLS v1.0 and even v1.1, too.
(01-07-2021, 04:06 PM)luigisic Wrote:Code:IdOpenSSLSetLibPath('C:\Openssl102q'); // Path where is the OpenSSL Library version 1.0.2q
You should be calling that only 1 time, such as at program startup.
(01-07-2021, 04:06 PM)luigisic Wrote:Code:// Setup Host, Username and Password
SMTP.Host := edtHost.Text;
SMTP.Port := 465;
Note that not all servers use port 465.
(01-07-2021, 04:06 PM)luigisic Wrote:Code:MailMessage.Recipients.EMailAddresses := edtTo.Text + ',' + edtCC.Text;
CC recipients should be assigned to the TIdMessage.CCList property instead:
Code:
MailMessage.Recipients.EMailAddresses := edtTo.Text;
MailMessage.CCList.EMailAddresses := edtCC.Text;