Quantcast
Channel: Rebex Q&A Forum - Recent questions and answers
Viewing all articles
Browse latest Browse all 3862

ews communication logging

$
0
0

On future versions can you consider filtering event "Opening log file." from LogLevel.Error example usage:

using (var client = new Ews())
{
    client.LogWriter = new FileLogWriter(@"C:\ews-oauth.log", Rebex.LogLevel.Error);

    client.Settings.Impersonation = new EwsImpersonation() { SmtpAddress = SmtpAddress };
    await client.ConnectAsync("outlook.office365.com", SslMode.Implicit);
    await client.LoginAsync(result.AccessToken, EwsAuthentication.OAuth20);

    // Office 365 sending limit is 10,000 per day, but limited to 30 per minute.
    // https://docs.microsoft.com/en-us/office365/servicedescriptions/exchange-online-service-description/exchange-online-limits#sending-limits-1
    var rateLimiter = new RateLimiter(TimeSpan.FromMinutes(1), 25);
    foreach (var email in messages)
    {
        rateLimiter.WaitUntilLimit();
        client.SendMessage(email);
    }
}

This never used to appear in earlier versions.


Viewing all articles
Browse latest Browse all 3862

Trending Articles