Question
· May 26, 2016

Cache 2010.1 and Office 365 SMTP Relay

Does anyone have any experience with getting, unfortunately, an older version of Cache to authenticate via SMTP to send email? I have verified that the settings are set up properly on the mailbox as I have successfully sent an email from a LAMP server, which comes from the same IP address.

If you have any thoughts, I would greatly appreciate it.

 

This is the error I receive

ERROR #6034: SMTP server connection failed during MAIL FROM command: <READ>zSend+105^%Net.SMTP.1.

when I run the following.

S() Public {
server=##class(%Net.SMTP).%New()
server.smtpserver="smtp.office365.com"
server.port="587"

auth=##class(%Net.Authenticator).%New()
auth.UserName="user@sender.com"
auth.Password="pa$$word"
server.authenticator=auth

message=##class(%Net.MailMessage).%New()
message.From="user@sender.com"
message.To.Insert("user@receiver.com")
message.Subject="Sent by Cache mail"
message.Charset="iso-8859-1"
message.TextData.Write("This message has been sent using an SMTP server with Authentication.")

status=server.Send(message)
($$$ISERR(status)) {

server.Error
$$$ERROR()

}

}

Discussion (6)2
Log in or sign up to continue