Hi, Generally (convention) smtp on port 25 is unencrypted.
C_LONGINT($vl_error;$vl_ssl;$vl_port;$vl_protocol) $vl_port:=25 $vl_protocol:=2 //2 = SMTP or SMTP with STARTTLS $vl_error:=IT_SetPort ($vl_protocol;$vl_port) $vl_ssl:=0 // sessionParam Longint 0 or omitted = Do not use SSL but switchover allowed $vl_error:=SMTP_Send ($vl_smtpId;$vl_ssl) NOTE : if the SMTP server supports the option STARTTLS, the connexion will switch to SSL/TLS secured connexion (see below). Otherwise the connexion is not secured. SMTP on port 465 is explicit ssl. ie. The tcp connexion starts with a SSL/TLS handshake. C_LONGINT($vl_error;$vl_ssl;$vl_protocol;$vl_port;$vl_protocol) $vl_port:=465 $vl_protocol:=12 //12 = SMTP SSL $vl_error:=IT_SetPort ($vl_protocol;$vl_port) $vl_ssl:=1 // sessionParam Longint 0 or omitted = Do not use SSL but switchover allowed $vl_error:=SMTP_Send ($vl_smtpId;$vl_ssl) With SMTP on port 587, the connexion starts unencrypted. If the SMTP server replies that it can support option STARTTLS (on port 587 it should), then the tcp connexion switches from unencrypted to SSL/TLS secured connexion (SSL/TLS handshake), and then the login/password are exchanged. This is automatic and transparent (since 4D v13.2). C_LONGINT($vl_error;$vl_ssl;$vl_port;$vl_protocol) $vl_port:=587 $vl_protocol:=2 //2 = SMTP or SMTP with STARTTLS $vl_error:=IT_SetPort ($vl_protocol;$vl_port) $vl_ssl:=0 // sessionParam Longint 0 or omitted = Do not use SSL but switchover allowed $vl_error:=SMTP_Send ($vl_smtpId;$vl_ssl) Note that the SSL/TLS handshake on an open unencrypted tcp connexion (switching a connexion from unencrypted to secured) is impossible to do with 4D IC tcp commands (or NTK AFAIK)... HTH Bruno ********************************************************************** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:[email protected] **********************************************************************

