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 Async Function GetFollowUpFlagAsync( _
    info As MailInfo
) As Task (Of String)
[C#]
public string GetFollowUpFlag(
    MailInfo info
);

public async Task<string> GetFollowUpFlagAsync(
    MailInfo info
);
[C++]
public: String^ GetFollowUpFlag(
    MailInfo^ info
);
[JScript]
public function GetFollowUpFlag( 
    info: MailInfo
) : string

Parameters

info
The MailInfo instance to retrieve follow-up flag.

Return Value

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

Remarks

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.

Example

[C#]
var client = new MailClient("TryIt");
// you must use EWS or Graph API to connect the server
client.Connect(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;
    client.GetFollowUpFlag(mailInfos[i]);
    
    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