# emailAdapter Element

Contains the information needed to submit an InfoPath form as an attachment to an e-mail, with a specified set of recipients, a subject, and an introduction.

## Type

`xsd:complexType`

## Child Elements

Element | Description
--- | ---
to | Contains a list of addresses, separated by semicolons, to be added to the to line of the submitted e-mail.
cc | Contains a list of addresses, separated by semicolons, to be added to the cc line of the submitted e-mail.
bcc | Contains a list of addresses, separated by semicolons, to be added to the bcc line of the submitted e-mail.
subject | Contains the subject of the submitted e-mail.
intro | Contains the introduction of the submitted e-mail.
attachmentFileName | Contains the file name of the attachment to be submitted with the e-mail.

## Attributes

Attribute | Type | Required | Description | Possible Values
--- | --- | --- | --- | ---
name | `xdTitle` | Yes | Contains the name of the emailAdapter. | minLength = 1 maxLength = 255 pattern = ([^\p{Z}\p{Cc}\p{Cf}\p{Cn}])(([^\p{Zl}\p{Zp}\p{Cc}])*([^\p{Z}\p{Cc}\p{Cf}\p{Cn}]))?
queryAllowed | `xdYesNo` | No | Specifies whether the adapter can be used for querying the data source. Omitted for the emailAdapter, corresponding to a default value of "no". | yes no
submitAllowed | `xdYesNo` | No | Specifies whether the adapter can be used for submitting to the data source. Always set to "yes" for the emailAdapter. | yes no

## Definition

    <xsd:element name="emailAdapter">
      <xsd:complexType>
        <xsd:all>
          <xsd:element name="to" minOccurs="0">
            <xsd:complexType>
              <xsd:attribute name="value" type="xsd:string" use="required"></xsd:attribute>
              <xsd:attribute name="valueType" type="xsf:xdExpressionLiteral" use="optional"></xsd:attribute>
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="cc" minOccurs="0">
            <xsd:complexType>
              <xsd:attribute name="value" type="xsd:string" use="required"></xsd:attribute>
              <xsd:attribute name="valueType" type="xsf:xdExpressionLiteral" use="optional"></xsd:attribute>
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="bcc" minOccurs="0">
            <xsd:complexType>
              <xsd:attribute name="value" type="xsd:string" use="required"></xsd:attribute>
              <xsd:attribute name="valueType" type="xsf:xdExpressionLiteral" use="optional"></xsd:attribute>
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="subject" minOccurs="0">
            <xsd:complexType>
              <xsd:attribute name="value" type="xsd:string" use="required"></xsd:attribute>
              <xsd:attribute name="valueType" type="xsf:xdExpressionLiteral" use="optional"></xsd:attribute>
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="intro" minOccurs="0">
            <xsd:complexType>
              <xsd:attribute name="value" type="xsd:string" use="required"></xsd:attribute>
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="attachmentFileName" minOccurs="0">
            <xsd:complexType>
              <xsd:attribute name="value" type="xsd:string" use="required"></xsd:attribute>
              <xsd:attribute name="valueType" type="xsf:xdExpressionLiteral" use="optional"></xsd:attribute>
            </xsd:complexType>
          </xsd:element>
        </xsd:all>
        <xsd:attribute name="name" type="xsf:xdTitle" use="required"></xsd:attribute>
        <xsd:attribute name="queryAllowed" type="xsf:xdYesNo" use="optional"></xsd:attribute>
        <xsd:attribute name="submitAllowed" type="xsf:xdYesNo" use="optional"></xsd:attribute>
      </xsd:complexType>
    </xsd:element>

## Remarks

Note This item is not supported when the Disable Service Pack features option on the Advanced tab of the Options dialog box in InfoPath is selected or when Microsoft Office 2003 Editions Service Pack 1 or later is not installed. Any form defined by a form definition file (.xsf) that includes this item cannot be opened in InfoPath when service pack features are disabled or unavailable.

## Example

The following is an example of the emailAdapter element:

    <xsf:emailAdapter name="Submit" submitAllowed="yes">
     <xsf:to value="someone@example.com" valueType="literal"/>
     <xsf:cc value="my:ccNames" valueType="expression"/>
     <xsf:bcc value="someoneelse@example.com" valueType="literal"/>
     <xsf:subject value="My report" valueType="literal"/>
     <xsf:intro value="See below"/>
     <xsf:attachmentFileName value="Status Report" valueType="literal"/>
    </xsf:emailAdapter>

©2003-2004 Microsoft Corporation. All rights reserved. Permission to copy, display and distribute this document is available at: http://msdn.microsoft.com/library/en-us/odcXMLRef/html/odcXMLRefLegalNotice.asp