The class method "test" in the following code snippet sends an HTML email with an embedded image. Edit the literal strings to change the embedded image, to address, from address, subject, and body of the email.
Class objectscript.sendEmailWithImage Extends %RegisteredObject
{
classmethod test() {
S SmtpServer = ""
S SmtpUserName = ""
S SmtpPassword = ""
S imgPath="C:\test.jpg"
set s=##class(%Net.SMTP).%New()
set s.smtpserver=SmtpServer
set auth=##class(%Net.Authenticator).%New() ; use default authentication list
set auth.UserName=SmtpUserName
set auth.Password=SmtpPa



