I have created a WebApplication which is used by my Team Members. They are accessing WebApp with a tunnel link on their PC. There is a function where Team Mates send email by clicking on button. This function is working on fine for me, but when they try using this function Outlook triggers email from my Outlook which is on my PC instead of their individual Outlook account.
Here is the code to trigger email
using (Db db = new Db())
{
Ticket newDTO = db.Tickets.Find(id);
Application app = new Application();
MailItem mailItem = app.CreateItem(OlItemType.olMailItem);
mailItem.Subject = "Feedback: Ticket Escalated " + newDTO.CaseId + " For Customer " + newDTO.EscalatedOn;
mailItem.To = newDTO.Email;
mailItem.CC = "lead@mydomain.com";
mailItem.HTMLBody = "Hello " + newDTO.Number + "<b>Feedback:</b>" + "<br /><br />" + newDTO.HowCanWeDeEscalate;
mailItem.Importance = OlImportance.olImportanceHigh;
mailItem.Display(false);
mailItem.Send();
}
How can I make this code work? So the email is sent by their individual outlook email and not mine.