Forward/Reply/ReplyAll by referencedMessageUniqueUri

Hello, I am evaluating exchange mail client.

Trying to use these methods
Aspose.Email.Exchange.IEWSClient.Forward(Aspose.Email.Mail.MailMessage, Aspose.Email.Exchange.ExchangeMessageInfo)
Aspose.Email.Exchange.IEWSClient.Reply(Aspose.Email.Mail.MailMessage, Aspose.Email.Exchange.ExchangeMessageInfo)
Aspose.Email.Exchange.IEWSClient.ReplyAll(Aspose.Email.Mail.MailMessage, Aspose.Email.Exchange.ExchangeMessageInfo)

when referencedMessage is second parameter of type ExchangeMessageInfo,

In my interface I would like to implement following signature of method:

public void ForwardMessage(string referencedMessageUniqueUri, string to, string body){
// the question is: How can I get ExchangeMessageInfo by referencedMessageUniqueUri;
// or : How can I Forward/Reply/ReplyAll message by having referencedMessageUniqueUri

Hi George,

Thank you for contacting Aspose support team.

Aspose.Email provides facility to forward message using ExchangeMessageInfo object. However, you may use following sample code to forward email using uri as there is no direct method available to use reference message uri. First you have to search the ExchangeMessageInfo object against the uri and then perform the task. Should you have any other query in this regard, please feel free to write us back.

static void ForwardMessage(string uri, string to, string body)
    IEWSClient client = GetAsposeEWSClient();
    ExchangeMessageInfoCollection messageInfoCol = client.ListMessages(client.MailboxInfo.InboxUri);
    ExchangeMessageInfo filteringQuery = (from info in messageInfoCol where info.UniqueUri == uri select info).ToList().FirstOrDefault();
    MailMessage mail = new MailMessage();
    mail.From = new MailAddress("");
    mail.To.Add(new MailAddress(to));
    mail.Body = body;
    client.Forward(mail, filteringQuery);