Platform SDK: MAPI

Resending an Undelivered Message

A transport provider sends a nondelivery report (NDR) when it cannot successfully deliver a message that you have submitted. It is up to the client whether or not users can attempt to resend these undelivered messages. If you support resending messages, you can either use a form provided by MAPI or implement your own. The MAPI form displays the names of the failed recipients and the reason for the delivery failure, if possible, and includes a button that, when selected, allows a user to resend the message.

When a resent message is received, it should look exactly like the original message. The recipient should be unable to differentiate between a message that was delivered on its first attempt at transmission or a subsequent attempt. Replies on this message should work exactly as if the message had been sent successfully the first time.

To resend an undelivered message

  1. Call IMAPIFolder::CreateMessage to create a new message.
  2. Copy all of the properties from the original message, excluding PR_MESSAGE_RECIPIENTS, the PR_SENDER properties, and the PR_SENT_REPRESENTING properties. Make the following property modifications:
  3. Call ScCreateConversationIndex to set up conversation tracking if desired.
  4. Call the new message's IMessage::ModifyRecipients method to update the recipient list.
  5. Call IMessage::SubmitMessage to save and send the new message.