EmailAdapter Object
InfoPath Developer Reference |
Represents the data adapter for submitting form information in e-mail by using Microsoft Office Outlook.
Version Information
Version Added: InfoPath 2003
Remarks
Use the Item property of the DataAdapters collection to return an EmailAdapter object.
The EmailAdapter object contains the following properties:
Property | Description |
---|---|
AttachmentFileName | Returns or sets the file name to be used for the current form when attached to the e-mail message for an EmailAdapter object. |
AttachmentType | Returns or sets the type of attachments that are sent with the e-mail message in addition to the current view for an EmailAdapter object. |
BCC | Returns or sets the BCC recipients for an EmailAdapter object. |
CC | Returns or sets the CC recipients for an EmailAdapter object. |
Intro | Returns or sets the introduction in the body of the e-mail message for an EmailAdapter object. |
Name | Returns the name of an EmailAdapter object. |
QueryAllowed | Corresponds to the queryAllowed attribute in the form definition file (.xsf). Always returns False for the EmailAdapter object. |
Subject | Returns or sets the subject of the e-mail message for the specified EmailAdapter object. |
SubmitAllowed | Corresponds to the submitAllowed attribute in the form definition file (.xsf). Always returns True for the EmailAdapter object. |
To | Returns or sets the To recipients for the specified EmailAdapter object. |
The EmailAdapter object contains the following methods:
Method | Description |
---|---|
Query | Because the EmailAdapter object is available for submitting data only, this method will always generate a run-time error when it is called on that object. |
Submit | Executes the submit operation on the associated data adapter. |
SubmitData | Submits the specified DOM element or DOM document to a data adapter. |
Example
In the following example, a reference to the EmailAdapter object is set by passing the name of the EmailAdapter object to the Item property of the DataAdapters collection:
JScript |
---|
|
After the reference has been set, you can use the properties of the EmailAdapter object as shown in the following example, which sets the To property and the Subject property, then submits the form.
JScript |
---|
|
See Also