Business object structures

The e-Mail adapter top-level business object must contain a set of attributes that describe the content and routing information for an e-mail message. The adapter composes the e-mail message using these attributes. These attributes are listed in Table 6.

Table 6. Required attributes in a top-level e-mail business object
Name Description
RecipientName
 
Recipient e-mail address or addresses. For more information, see "Specifying valid e-mail addresses".
MessageSubject
 
Description of the e-mail message. This value is set in the business object by the integration broker.
MessageContent
 
Content of the e-mail message. This value is set in the business object by the integration broker.
FromAddress
 
Sender's e-mail address. The sender receives any undelivered messages. For more information, see "Specifying valid e-mail addresses".
MimeType
 
Mime type of the attachments. If not specified, the adapter does not process child business objects.
AttachmentExtension
 
Set the Default Value property of this attribute to the extension that should be given to files that represent business objects contained in the e-mail. For instance, if a business object is sent as an attachment in an e-mail and the Default Value property of this attribute is set to the value txt then the attachment that represents the business object will have an extension of .txt.
BusinessObjectMimeCharset
 
The character set for business objects contained in the e-mail. For more information about this property, see the description for the identical property at the level of the adapter definition in BusinessObjectMimeCharset.
BusinessObjectMimeEncoding
 
The encoding for business objects contained in the e-mail. For more information about this property, see the description for the identical property at the level of the adapter definition in BusinessObjectMimeEncoding.
MessageContentMimeCharset
 
The character set for the message content. For more information about this property, see the description for the identical property at the level of the adapter definition in MessageContentMimeCharset.
MessageContentMimeEncoding
 
The encoding for the message content. For more information about this property, see the description for the identical property at the level of the adapter definition in MessageContentMimeEncoding.
MessageHeaderMimeCharset
 
The character set for the message header. For more information about this property, see the description for the identical property at the level of the adapter definition in MessageHeaderMimeCharset.
MessageHeaderMimeEncoding
 
The encoding for the message header. For more information about this property, see the description for the identical property at the level of the adapter definition in MessageHeaderMimeEncoding.

In addition to the attributes listed in Table 6, the top-level business object can contain the optional attributes listed in Table 7.

Table 7. Optional attributes in a top-Level e-mail business object
Name Description
PriorityLevel
 
Valid values include Normal, High, and Low. The adapter uses this value to set the priority of outgoing mail.
attributes that represent hierarchical business objects The adapter converts the child business objects into attachments in the e-mail message.
attributes that specify the names of files The adapter includes the files as attachments in the e-mail message.

Figure 4 illustrates the basic structure of a top-level business object named Email_TLO_Customer_Wrapper for the e-Mail adapter. This business object contains a hierarchical Customer business object as a child and includes an attribute pointing to a file. The Customer business object and the file are added to the e-mail as attachments.

Figure 4. Example e-Mail adapter business object

Diagram of an sample e-Mail adapter business object.

Attributes specifying business objects

Any business object can be included in the top-level Email business object, as long as the contained business object conforms to the requirements imposed by the configured data handler. If an attribute is a business object, its cardinality must be 1.

When creating business object definitions for the e-Mail adapter, keep in mind that a data handler for the e-Mail adapter must place each business object contained in a top-level business object for the e-Mail adapter in a single attachment. This contained business object may be a large hierarchical business object containing many child business objects of its own, and these children are typically included in the serialized business object in the attachment.

There may be instances when you want to place multiple hierarchical business objects in a single attachment in the top-level e-Mail adapter business object. To do this, wrap the business objects in a parent business object, and define a complex attribute for that parent in the e-Mail adapter top-level business object.

Attributes specifying files

To include a file attachment with an e-mail message, specify the complete filename including the path name. If the file resides on another machine, specify the file name using the UNC naming convention. For example, if the file resides on a machine named Ernesto, specify the path name as: \\Ernesto\Email\EmailMessage.txt. You can also map a network drive to the machine and specify the file name as F:\Email\EmailMessage.txt.

How business objects and files are processed

When the adapter has processed the basic set of attributes in the top-level business object, it looks for additional attributes. These can be either of type String or type business object. If an attribute is of any other type, the adapter ignores it. The adapter processes each additional non-null attribute as follows:

After processing all the non-null attributes of the top-level business object successfully, the adapter sends the e-mail.

Copyright IBM Corp. 1997, 2003