I want to send and save emails from our intranet based CRM. We are using Visual Studio 2017 Enterprise edition. Following is the code I am using to send email through exchange Office 365. In this, I have to pass the password in plain text to provide credentials
all the time.
My question is "Is there any other way I can send and save email using Exchange Web Service without passing password?"
Because I have to store this password for every single user when they want to send email! And I do not want to store passwords on SQL server or in memory!!!
var service = new Microsoft.Exchange.WebServices.Data.ExchangeService(Microsoft.Exchange.WebServices.Data.ExchangeVersion.Exchange2013_SP1);
string fromAddress = Security.EXCHANGE_EMAIL;
string fromPassword = Security.Password;
s
ervice.Credentials = new Microsoft.Exchange.WebServices.Data.WebCredentials(fromAddress, fromPassword);
service.TraceEnabled = false;
service.EnableScpLookup = true;
service.Url = new Uri("https://outlook.office365.com/ews/exchange.asmx");
Microsoft.Exchange.WebServices.Data.Appointment appointment = new Microsoft.Exchange.WebServices.Data.Appointment(service);