1. Marcos Bolonha
  2. PowerBuilder
  3. Tuesday, 26 September 2023 13:05 PM UTC

Hi,

 

I found on PB22R2 docs:

  • Supports using any of the following connection types: None (Plain text); STARTTLS, and Auto STARTTLS.

 

How can I set STARTTLS for sending an email message using the new SMTPClient of PB2022R2?

I didn't find any example.

 

Thanks in advanced.

 

Marcos

Mark Goldsmith Accepted Answer Pending Moderation
  1. Tuesday, 26 September 2023 17:20 PM UTC
  2. PowerBuilder
  3. # 1

Hi Marcos,

John is mostly correct and provided a great article. Here is a link that also provides a good background on SSL -> TLS and STARTTLS: https://www.fastmail.help/hc/en-us/articles/360058753834-SSL-TLS-and-STARTTLS.  While there are some things that get negotiated under the covers (whether to use TLS and what version) and there is a port dependency for TLS versus a non-TLS connection versus STARTTLS, the built-in SMTPClient object has a property called EnableTLS which must be enabled/ set to True in order for a TLS connection to be made.

HTH...regards,

Mark

Comment
  1. John Fauss
  2. Tuesday, 26 September 2023 17:38 PM UTC
Thank you for adding/clarifying, Mark!
  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Tuesday, 26 September 2023 14:56 PM UTC
  2. PowerBuilder
  3. # 2

Hi,

Neither an expert. All I can say is that if you're using GMAIL, things lately have become a lot harder with Google and I switched to use a microsoft account for SMTP.

regards.

Comment
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Tuesday, 26 September 2023 14:12 PM UTC
  2. PowerBuilder
  3. # 3

Hi, Marcos -

I am NOT an SMTP expert, but from what I read, the use of the STARTTLS command gets issued "under the covers" based on which port number is being used, so there's no setting or function in the SMTPClient object you can use to issue it. Here's a link to an article I found which may help explain STARTTLS:

    https://mailtrap.io/blog/starttls-ssl-tls/

Best regards, John

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.