Credentials property

ExchangeCredentials? get Credentials
Gets or sets the credentials used to authenticate with the Exchange Web Services. Setting the Credentials property automatically sets the UseDefaultCredentials to false.

Implementation

ExchangeCredentials? get Credentials => this._credentials;
set Credentials (ExchangeCredentials? value)

Implementation

set Credentials(ExchangeCredentials? value) {
  this._credentials = value;
  this._useDefaultCredentials = false;
  this._cookieContainer = new http
      .CookieContainer(); // Changing credentials resets the Cookie container
}