This commit is contained in:
@@ -452,7 +452,7 @@ namespace rockfishCore.Util
|
||||
|
||||
private static List<rfMessageSummary> getInboxSummariesFor(string sourceAccount, string sourcePassword)
|
||||
{
|
||||
Console.WriteLine($"getInboxSummariesFor {sourceAccount}");
|
||||
//Console.WriteLine($"getInboxSummariesFor {sourceAccount}");
|
||||
List<rfMessageSummary> ret = new List<rfMessageSummary>();
|
||||
using (var client = new ImapClient())
|
||||
{
|
||||
@@ -462,23 +462,23 @@ namespace rockfishCore.Util
|
||||
//client.Connect(MAIL_IMAP_ADDRESS, MAIL_IMAP_PORT, true);
|
||||
//testing
|
||||
|
||||
Console.WriteLine($"connecting to {MAIL_IMAP_ADDRESS} on {MAIL_IMAP_PORT}");
|
||||
//Console.WriteLine($"connecting to {MAIL_IMAP_ADDRESS} on {MAIL_IMAP_PORT}");
|
||||
client.Connect(MAIL_IMAP_ADDRESS, MAIL_IMAP_PORT);
|
||||
|
||||
// Note: since we don't have an OAuth2 token, disable
|
||||
// the XOAUTH2 authentication mechanism.
|
||||
Console.WriteLine($"removing XOAUTH2");
|
||||
//Console.WriteLine($"removing XOAUTH2");
|
||||
client.AuthenticationMechanisms.Remove("XOAUTH2");
|
||||
|
||||
Console.WriteLine($"authenticating...");
|
||||
//Console.WriteLine($"authenticating...");
|
||||
client.Authenticate(sourceAccount, sourcePassword);
|
||||
|
||||
var inbox = client.Inbox;
|
||||
Console.WriteLine($"opening inbox...");
|
||||
//Console.WriteLine($"opening inbox...");
|
||||
inbox.Open(FolderAccess.ReadOnly);
|
||||
Console.WriteLine($"fetching summaries...");
|
||||
//Console.WriteLine($"fetching summaries...");
|
||||
var summaries = inbox.Fetch(0, -1, MessageSummaryItems.Full | MessageSummaryItems.UniqueId);
|
||||
Console.WriteLine($"disconnecting...");
|
||||
//Console.WriteLine($"disconnecting...");
|
||||
client.Disconnect(true);
|
||||
foreach (var summary in summaries)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user