示例#1
0
 internal static async Task Fetch(EmailAccount account)
 {
     using (var client = new FetchClient {
         Account = account
     })
         await client.Fetch();
 }
示例#2
0
        public static async Task FetchAll()
        {
            foreach (var account in Accounts)
            {
                try
                {
                    Log.For(typeof(Mailbox)).Info("Fetching emails for " + account.S3Bucket);
                    await FetchClient.Fetch(account);

                    Log.For(typeof(Mailbox)).Info("Fetched emails for " + account.S3Bucket);
                }
                catch (Exception ex)
                {
                    Log.For(typeof(Mailbox)).Error(ex, "Failed to fetch emails because " + ex.ToFullMessage());
                }
            }
        }