MailClient.GetFollowUpFlag Method

Receives a specified email's follow-up flag from Office 365 or Exchange Server.

[Visual Basic]
Public Function GetFollowUpFlag( _
    info As MailInfo
) As String
public string GetFollowUpFlag(
    MailInfo info
public: String^ GetFollowUpFlag(
    MailInfo^ info
public function GetFollowUpFlag( 
    info: MailInfo
) : string


The MailInfo instance to retrieve follow-up flag.

Return Value

One of "notFlagged", "complete", "flagged".


This method retrieves email's follow-up flag, it only supports EWS and Graph API protocol. If you have set GetMailInfosParam.GetMailInfosOptions.GetFollowUpFlag, you can get the follow-up flag from MailInfo.FollowUpFlag property directly after calling GetMailInfos method.


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

// retrieve categories and follow up flag to MailInfo, 
// if you have set the following flag, you don't have to use GetFollowUpFlag method
// 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++)
    // if you have set the following flag, you don't need to call GetFollowUpFlag method
    // client.GetMailInfosParam.GetMailInfosOptions |= GetMailInfosOptionType.GetFollowUpFlag;
    Console.WriteLine(string.Format("Index: {0}", mailInfos[i].Index));
    Console.WriteLine(string.Format("FollowUpFlag: {0}", mailInfos[i].FollowUpFlag));

See Also

MailClient.GetMail Method
Mail Class