I get "[alert] Please login via your web browser" error.
using (Imap imap = new Imap())
{
imap.ConnectSSL("imap.gmail.com");
imap.UseBestLogin("junaid21700@gmail.com", "xxx");
imap.SelectInbox();
List<long> uids = imap.Search(Flag.Unseen);
foreach (long uid in uids)
{
var eml = imap.GetMessageByUID(uid);
IMail mail = new MailBuilder().CreateFromEml(eml);
Console.WriteLine(mail.Subject);
Console.WriteLine(mail.Text);
}
imap.Close();
}
I'm begginer please help what is the problem