The email object model

Guidewire PolicyCenter uses the following two classes to define email messages:

  • gw.api.email.Email
  • gw.api.email.EmailContact

Both of these classes are simple data containers with almost no logic. The classes also contain a number of utility methods that perform operations on the fields defined in the class.

gw.api.email.Email

The Email class contains the following fields, most of which are self-explanatory:

Field

Description

Subject

Subject of the email

Body

Content of the email

Sender

Sender of the email

ReplyTo

Contact object (It is possible for this to be different from the Sender.)

ToRecipients

List of Contact objects

CcRecipients

List of Contact objects

BccRecipients

List of Contact objects

Documents

List of DocumentBase entities for attachment to the email

gw.api.email.EmailContact

The EmailContact class contains the following fields:

Field

Description

Name

Name of contact

EmailAddress

Email address of contact

Contact

Contact object, which can be null. If this parameter exists, it sets the Name and EmailAddress fields to the appropriate values from the specific Contact entity.