The MailComposeMessage function displays a compose message form.
HRESULT MailComposeMessage( MAILCOMPOSEFIELDS* pmcf );
- [in] Reference to a MAILCOMPOSEFIELDS structure. The compose message form can be pre-filled by specifying values in this structure. Can be NULL if the form has no pre-filled values.
This function returns the standard values E_INVALIDARG, E_OUTOFMEMORY, E_UNEXPECTED, and E_FAIL, as well as the following:
- The call succeeded.
This function enables you to create an empty compose form and specify the fields with which to populate the form. The MAILCOMPOSEFIELDS structure specifies the fields for the form.
You can also specify which account is used to send this message. You can specify either the name of the account or the transport to use. You can also specify to send by using a mailto URL format.
This function is asynchronous. It returns before the form has been displayed, but will validate that the transport specified is correct and that the attachments specified exist. If the attachments do not exist, the function returns an appropriate error code.
Note If a body is specified, then no signature is shown associated with the account. If no body is specified, the signature associated with the account is shown.
Only one attachment is allowed to be added to a message.
Pocket PC: Windows Mobile Version 5.0 and later
Smartphone: Windows Mobile Version 5.0 and later
OS Versions: Windows CE 5.01 and later
Send Feedback on this topic to the authors