MailClient.SetFollowUpFlag Method

Set a specified email with follow-up flag in Office 365 or Exchange Server.

[Visual Basic]
Public Sub SetFollowUpFlag( _
    info As MailInfo, _
    followUpFlag As String _
public void SetFollowUpFlag(
    MailInfo info,
    string followUpFlag
public: void SetFollowUpFlag(
    MailInfo^ info,
    String^ followUpFlag
public function SetFollowUpFlag(
    info : MailInfo,
    followUpFlag: String


The email to set follow-up flag.
One of "notFlagged", "complete", "flagged".


This method only supports EWS and Graph API protocol.


var client = new MailClient("TryIt");
// you must use EWS or Graph API to connect the server

// retrieve categories and follow up flag to MailInfo
client.GetMailInfosParam.GetMailInfosOptions |= GetMailInfosOptionType.GetCategories;
client.GetMailInfosParam.GetMailInfosOptions |= GetMailInfosOptionType.GetFollowUpFlag;
var mailInfos = client.GetMailInfos();
Console.WriteLine("Total {0} emails", mailInfos.Length);
for (int i = 0; i < mailInfos.Length; i++)
    // you can set notFlagged, flagged, or complete
    client.SetFollowUpFlag(mailInfos[i], "flagged");
    Console.WriteLine(string.Format("Index: {0}", mailInfos[i].Index));
    Console.WriteLine(string.Format("FollowUpFlag: {0}", mailInfos[i].FollowUpFlag));

See Also

MailClient.SetFollowUpFlag Method