Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Setting TidSMTP
#5
(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;

Reply


Messages In This Thread
Setting TidSMTP - by luigisic - 10-24-2020, 05:21 PM
RE: Setting TidSMTP - by luigisic - 10-25-2020, 04:19 PM
RE: Setting TidSMTP - by waikitlo - 01-07-2021, 01:36 PM
RE: Setting TidSMTP - by luigisic - 01-07-2021, 04:06 PM
RE: Setting TidSMTP - by rlebeau - 01-07-2021, 05:43 PM
RE: Setting TidSMTP - by luigisic - 01-07-2021, 06:15 PM
RE: Setting TidSMTP - by waikitlo - 01-08-2021, 01:08 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)