Customizing script templates using objects

You can customize the features of Email Management using the following objects. For detailed descriptions of the methods and properties of each object, see the Developer Help on the Sage CRM Help Center.

  • MsgHandler Object: The MsgHandler Object provides basic access to the Email Object and functionality for the system. It is the top level object within the scripting. It is passed into the script at run time.
  • Email Object: The Email Object provides access to the email itself through its properties and methods. This object is passed into the script by default as the Email Object but can also be accessed from the MsgHandler Object as follows:
    Copy
    myemail = MsgHandler.msg
  • AddressList Object: Part of the Email Object, this object provides access to the To, CC and BCC lists of addresses. You can access this object as follows:
    Copy
    myaddresslist = email.CC;
  • MailAddress Object: This object provides access to an individual address from the AddressList Object. You can return an individual MailAddress object as follows:
    Copy
    myaddress = email.CC.Items(1);
  • AttachmentList Object: This object provides access to the email attachments. You can access this Object as follows:
    Copy
    myAttachmentList = email.Attachments;
  • Attachment Object: This object provides access to an individual attachment. You use the AttachmentList Object's "items" property to access this object.
    Copy
    myAttachment = email.Attachments.Items(1);