Enough-Software / enough_mail

IMAP, POP3 and SMTP clients for Dart developers. Contains both low level as well as a high level API.
Mozilla Public License 2.0
105 stars 55 forks source link

[AUTHENTICATIONFAILED] LOGIN Invalid credentials #246

Open jigneshhadiya2 opened 3 months ago

jigneshhadiya2 commented 3 months ago

A: connecting to server imap.mail.yahoo.com:993 - secure: true, timeout: 0:00:20.000000 S: * OK Welcome! IMAP Server up and ready to accept your request C: a0 LOGIN "*****@yahoo.com" "(password scrambled)" S: a0 NO [AUTHENTICATIONFAILED] LOGIN Invalid credentials [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: [AUTHENTICATIONFAILED] LOGIN Invalid credentials

this is my code snippet

Future<void> connectAndFetchYahooEmails() async {
   final client = ImapClient(isLogEnabled: true);

   await client.connectToServer('imap.mail.yahoo.com', 993, isSecure: true);

   final loginResponse = await client.login('***@yahoo.com', '*****');

   await client.selectInbox();

   final fetchResult = await client.fetchRecentMessages(
       messageCount: 10, criteria: 'BODY.PEEK[]');

   await client.logout();
 }