smiley22 / S22.Imap

A free, easy-to-use and well-documented .NET library component for communicating with IMAP servers
http://smiley22.github.com/S22.Imap/Documentation/
MIT License
211 stars 115 forks source link

Can not login to gmail #168

Closed GeneThomas closed 3 years ago

GeneThomas commented 3 years ago

Can you please verify that this library works against gmail presently? I have a gmail account, have enabled IMAP but:

   using (S22.Imap.ImapClient imap = new S22.Imap.ImapClient("imap.gmail.com", 993, "gene.l.thomas@gmail.com", password, S22.Imap.AuthMethod.Login, true))
  {
   }

throws

xm001 NO [AUTHENTICATIONFAILED] Invalid credentials (Failure)

GeneThomas commented 3 years ago

I had to turn gmail’s Less secure app access: Allow less secure apps: OFF