public static void Run()
{
// ExStart:SetFollowUpForRecipients
// The path to the File directory.
string dataDir = RunExamples.GetDataDir_Outlook();
MailMessage mailMsg = new MailMessage();
mailMsg.Sender = "[email protected]";
mailMsg.To = "[email protected]";
mailMsg.Body = "This message will test if follow up options can be added to a new mapi message.";
MapiMessage mapi = MapiMessage.FromMailMessage(mailMsg);
mapi.SetMessageFlags(MapiMessageFlags.MSGFLAG_UNSENT); // Mark this message as draft
DateTime dtReminderDate = new DateTime(2013, 5, 23, 16, 40, 0);
// Add the follow up flag for receipient now
FollowUpManager.SetFlagForRecipients(mapi, "Follow up", dtReminderDate);
mapi.Save(dataDir + "SetFollowUpForRecipients_out.msg");
// ExEnd:SetFollowUpForRecipients
}
}