When submitting a new message, the list of recipients must contain at least one entry. This is accomplished in steps 2 and 3.
The following sets addressing information on an existing message, and submits it:
// These calls create and set information in the address list data structure. hr = HrMAPICreateAddressList(
cProps, lpAdrProps, &lpAdrList); // If you copy address information from another message, these properties have the same values: // New address property was Property in message // PR_DISPLAY_NAME was PR_SENDER_NAME // PR_ENTRYID was PR_SENDER_ENTRYID // PR_ADDRTYPE was PR_SENDER_ADDRTYPE // PR_EMAIL_ADDRESS was PR_SENDER_EMAIL_ADDRESS // // Also, the recipient's PR_RECIPIENT_TYPE must be MAPI_TO, MAPI_CC, or MAPI_BCC // Update the message with list of addressees. hr = lpNewMessage->ModifyRecipients( 0L, lpAdrList); hr = HrMAPISetPropBoolean( lpNewMessage, PR_DELETE_AFTER_SUBMIT, TRUE); // Last step: submit the message. hr = lpNewMessage->Submit( 0L);