· Sep 26

How to use SMTP protocol with TLS and SSLConfiguration

Hi All,

In the below code, How to Add SSLConfiguration and TLS. Please advise.

My sample code.

set s=##class(%Net.SMTP).%New()
;set auth=##class(%Net.Authenticator).%New() 
;set auth.UserName=[["myUser"]]
;set auth.Password=[["myPassword"]]
;set s.authenticator=auth
set s.smtpserver=""
set s.timezone="-0400" 
set m=##class(%Net.MailMessage).%New()
set m.From=""
do m.To.Insert("")
do m.To.Insert("")
set m.Subject="Test IRIS mail 1"  
do m.TextData.Write("This message has been sent using an SMTP server ")
set status=s.Send(m)
if 'status do $system.OBJ.DisplayError(status)
Product version: IRIS 2023.1
Discussion (3)1
Log in or sign up to continue