Enable POP3 in Gmail

  • Sign in to Gmail.
  • Click the gear icon in the upper-right and select Settings.
  • Click Forwarding and POP/IMAP.
  • Select Enable POP for all mail or Enable POP for mail that arrives from now on. Here you can learn more about Gmail’s POP3 behavior
  • Remember that Gmail only allows secure TLS/SSL connections so you need to use ConnectSSL method.

Application specific password

An application specific password is a 16-digit password that gives an application permission to access your Google Account. Application passwords are the easiest way to log-in to your Gmail account using POP3 or IMAP.

2-Step-Verification must be enabled on your account to access this feature (you’ll get the ‘setting you are looking for is not available for your account’ error otherwise):

Once you have the password use it as a regular password for POP3, SMTP or IMAP clients.

OAuth 2.0

Another approach would be to use one of the OAuth 2.0 flows:

  1. OAuth 2.0 for installed applications
  2. OAuth 2.0 for web applications
  3. OAuth 2.0 for service accounts

Less secure apps (deprecated)

Less secure apps (those that use primary password to access) are no longer supported by Gmail, except some corporate accounts. You can find this here: enable access for ‘less’ secure apps 

Please note that contrary to what the label says those applications are secure – they use TLS to secure the communication. The term ‘less secure apps’ is used only because such applications need to be provided with account’s primary password to be able to access IMAP.

2-step verification

If you use 2-Step-Verification and are seeing a “password incorrect” error when trying to access POP3, IMAP, SMTP, an app password (or OAuth 2.0 access) will solve the problem. 

Simple .NET POP3 access sample

// C# code:
 
using(Pop3 pop3 = new Pop3())
{
    pop3.ConnectSSL("pop.gmail.com");
    pop3.Login("your_email@gmail.com", "app-password");
 
    foreach (string uid in pop3.GetAll())
    {
        var eml = pop3.GetMessageByUID(uid);
        IMail mail= new MailBuilder()
            .CreateFromEml(eml);
 
        Console.WriteLine(mail.Subject);
        Console.WriteLine(mail.Text);
    }
    pop3.Close();
}
' VB.NET code:
 
Using pop3 As New Pop3()
    pop3.ConnectSSL("pop.gmail.com")
    pop3.Login("your_email@gmail.com", "app-password")
 
    For Each uid As String In pop3.GetAll()
        Dim email As IMail = New MailBuilder() _
            .CreateFromEml(pop3.GetMessageByUID(uid))
        Console.WriteLine(email.Subject)
    Console.WriteLine(mail.Text)
    Next
    pop3.Close()
End Using

More .NET POP3 client samples. You can download Mail.dll IMAP library for .NET here.

Tags:  

Questions?

Consider using our Q&A forum for asking questions.

2 Responses to “Enable POP3 in Gmail”

  1. Gmail’s POP3 behavior Says:

    […] First remember to enable POP3 in Gmail. […]

  2. Download emails from Gmail via POP3 Says:

    […] First remember to enable POP3 in Gmail. […]