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 Async Function SetFollowUpFlagAsync( _
    info As MailInfo, _
    followUpFlag As String _
) As Task
[C#]
public void SetFollowUpFlag(
    MailInfo info,
    string followUpFlag
);

public async Task SetFollowUpFlagAsync(
    MailInfo info,
    string followUpFlag
);
[C++]
public: void SetFollowUpFlag(
    MailInfo^ info,
    String^ followUpFlag
);
[JScript]
public function SetFollowUpFlag(
    info : MailInfo,
    followUpFlag: String
);

Parameters

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

Remarks

This method only supports EWS and Graph API protocol.

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
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