I'm currently trying to configure Mail2Bug to create Bugs in Azure DevOps when new emails arrive in a shared mailbox. Everything was going well until the part where it needs to reply to the incoming message.
The code which handles this function can be found in EWSIncomingMessage.cs:
public void Reply(string replyHtml, bool replyAll)
{
//_message is of type EmailMessage
var reply = _message.CreateReply(replyAll);
reply.BodyPrefix = new MessageBody(BodyType.HTML, replyHtml);
reply.Send();
}
Instead of replying using the shared mailbox's email, it uses the one from the authenticated user. I'm assuming this has to do with how CreateReply populates the reply MailMessage in combination with EWS.
Are there any ways around this (possibly by creating a new MailMessage and simulate a reply)?