0

I have a local web application and its sending email over from EWS as below with app's user self Exchange Account information

ExchangeService _ExchangeService = new ExchangeService()
{
    Credentials = new NetworkCredential("name.surname@domain.com", "********"),
    Url = new Uri("https://xxx.domain.xxx/EWS/Exchange.asmx")
};

EmailMessage _EmailMessage = new EmailMessage(_ExchangeService);
_EmailMessage.Subject = "Subject Test";
_EmailMessage.Body = "Body Test";
_EmailMessage.ToRecipients.Add("name.surname@domain.com");
_EmailMessage.Save();

_EmailMessage.SendAndSaveCopy();

But I have to store user's exchange username and password values in database before sending email. I do not want to store user's password in database for security reasons. Is there any way to get user's login details from their local cache?

Kerberos
  • 331
  • 1
  • 11
  • @Silvermind How can I do? Any idea? – Kerberos Dec 18 '18 at 15:03
  • I misunderstood your question. Perhaps you could find some usefull information here: [Impersonation and EWS in Exchange](https://learn.microsoft.com/en-us/exchange/client-developer/exchange-web-services/impersonation-and-ews-in-exchange) – Silvermind Dec 18 '18 at 15:05

0 Answers0