Mail Object

You can use the Mail object to access information about the mail currently being processed. This can either be an outgoing message that is being rendered or an incoming message. 

Syntax

Mail.collection|property|method

Collections
Headers Contains the list of header fields
Receivers Contains the list of receivers that will receive the mail 
Tos Contains the list of receivers that are displayed in the To: field
CCs Contains the list of receivers that are displayed in the CC: field
Contents Contains the list of content items (body and attachments).
DSNHeaders Contains the list of DSN headers
DSNReceivers Contains the list of DSN receivers
Fields Contains the list of body fields
Properties
CodePage Sets the default CodePage for all contents in the current mail. The codepage tells eMill how to encode characters for different languages.
LCID Sets the default LCID for all contents in the current mail. The LCID refers to how dates, times, and currency are formatted for a specific geographical locale.
Sender Sets the SMTP sender. By default the sender will be initialized using the From: field.
From Sets the From: field.
Subject Sets or gets the message subject.
Date Sets or gets the message date.
SendDate Sets or gets the message send date.
Priority Sets or gets the message priority.
DSNEnvID Sets the DSN ENVID parameter.
DSNReturn Sets the DSN RET parameter.
DSNNotify Sets the DSN NOTIFY parameter.
DSNType Gets the DSN type.
Data Sets or gets the MIME content.

Additional header fields can be set using the Headers collection

Methods
AbortRender Aborts rendering for the current receiver.
Save Saves the mail to the disk (.eml file).
Events
Mail_OnEndRender This event is invoked when the mail has been rendered.
Mail_OnStartRender This event is invoked when the mail is about to be rendered.
Remarks

When rendering a mailing, all receivers associated with the current DataSource record will be added to the Receivers collection. Attachments will also be added to the Contents collection. The Mail_OnStartRender event is a good place to perform any receiver specific initialization such as adding user specific mail attachment or changing some header fields.  



©2001-2015 eMill. All trademarks property of their owners.