#DEFINE EGW_HIGH 3 >>#DEFINE EGW_NORMAL 2 >>#DEFINE EGW_LOW 1 >> >>* >>* This constant holds the email address of the recipient of this email. >>* It can either be a name in the sender's address book (as below) or >>* an email address in the form "Internet:henry@profutures.com". >>* >>local SYSTEM_ADMIN >>SYSTEM_ADMIN = "Henry Rohlfs" >> >>* >>* Compose the body of the message >>* >>local lcBody >>lcBody = "WARNING! An error occurred in an application." ; >> + ... >> >>* >>* Start a GroupWise session, login with defaults and add a >>* new message to the mailbox. >>* >>oGW = createobject("NovellGroupWareSession") >>oAcct = oGW.Login("", "") >>oMessages = oAcct.MailBox.Messages >>oMessage = oMessages.Add() >> >>*-- Create the message >>oMessage.Priority = EGW_HIGH >>oMessage.Subject = "Application Error Alert" >>oMessage.BodyText = lcBody >> >>*-- Add a recipient to the recipient collection, then >>*-- resolve the name against the default address book. >>*-- If you use just an Internet email address for the >>*-- recipient, use instead, >>*-- oMessage.Recipients.Add() >>*-- No need to use the .Resolve() call. >>oMessage.Recipients.AddByDisplayName(SYSTEM_ADMIN) >>oMessage.Recipients.Resolve() >> >>*-- Send the message >>oMessage.Send() >> >>*-- Release the session >>release oGW