Question RKumar · May 21
Currently, my Caché code triggers an email using Basic Authentication. Now Microsoft is going to stop Basic SMTP Authentication. In this case, what is the best approach to trigger an email alert from the database? It seems OAuth 2.0 is the best approach. Do anybody have any sample using Azure Entra ID?
4
1 68
Question RKumar · Sep 26, 2023

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="relay.abc.com"
set s.timezone="-0400" 
set m=##class(%Net.MailMessage).%New()
set m.From="test@company.com"
do m.To.Insert("kumars@test.com")
do m.To.Insert("test1@another.com")
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)
Q
3
0 550