public static async Task <bool> TryReplyMessageAsync() { // Create a draft message and then send it. If you send the message without first creating a draft, you can't easily retrieve // the message Id. var newMessageId = await EmailSnippets.CreateDraftAndSendAsync( STORY_DATA_IDENTIFIER, DEFAULT_MESSAGE_BODY, AuthenticationHelper.LoggedInUserEmail ); if (newMessageId == null) { return(false); } // Find the sent message. var sentMessageId = await GetSentMessageIdAsync(); if (String.IsNullOrEmpty(sentMessageId)) { return(false); } // Reply to the message. bool isReplied = await EmailSnippets.ReplyMessageAsync( sentMessageId, DEFAULT_MESSAGE_BODY); return(isReplied); }
public static async Task <bool> TryGetMessageWebLinkAsync() { // Create a draft message and send it. var newMessageId = await EmailSnippets.CreateDraftAndSendAsync( STORY_DATA_IDENTIFIER, DEFAULT_MESSAGE_BODY, AuthenticationHelper.LoggedInUserEmail ); if (newMessageId == null) { return(false); } // Find the sent message. var sentMessageId = await GetSentMessageIdAsync(); if (String.IsNullOrEmpty(sentMessageId)) { return(false); } var webLink = await EmailSnippets.GetMessageWebLinkAsync(sentMessageId); if (String.IsNullOrEmpty(webLink)) { return(false); } return(true); }