This is documentation for Caché & Ensemble. See the InterSystems IRIS version of this content.

For information on migrating to InterSystems IRIS, see Why Migrate to InterSystems IRIS?


class %SYS.Monitor.Email extends %Library.RegisteredObject

Provides a simple way for the System Monitor to send alerts via email. May be used by user extensions for Sensors, Subscribers or Notifiers to send configured email alerts by calling %New() and SendEmail(). Note that %New() can fail if the Server or Recipients are not correctly configured, so the caller should check for this and report the error in %objlasterror.

Property Inventory (Including Private)

Method Inventory (Including Private)


property Mailer as %Net.SMTP;
Property methods: MailerGet(), MailerGetSwizzled(), MailerIsValid(), MailerNewObject(), MailerSet()
property Msg as %Net.MailMessage;
Mail message
Property methods: MsgGet(), MsgGetObject(), MsgGetObjectId(), MsgGetSwizzled(), MsgIsEmpty(), MsgIsValid(), MsgNewObject(), MsgSet(), MsgSetObject(), MsgSetObjectId(), MsgUnSwizzle()


private method %OnNew(initval As %CacheString = "") as %Status
Calls Initialize() to fetch email configuration (Server, Recipients, SSL Config). If %New() fails and returns a null OREF, then the error will be in %objlasterror.
method Initialize() as %Status
Initialize the email object using configured Server, Recipients, SSL Config, etc. May fail if missing configuration info, see %Status.
method SendEmail(msg As %String) as %Status
Sends message via configured email.

Inherited Members

Inherited Methods (Including Private)