0 votes

I am using my username and password that currently has mail and I can access via outlook. It errors with message bad user or password. How can I track the issue since I am using a valid name and password?

Thanks

Limilabs.Mail.Log = true;

using(Pop3 pop3 = new Pop3())
{       
    pop3.Connect("mail.mycompany.com"); 
    pop3.UseBestLogin(
        "userMe@mycompany.com", 
        "!user-me_Password#");

    foreach (string uid in pop3.GetAll())
    {
        IMail email = new MailBuilder()
            .CreateFromEml(pop3.GetMessageByUID(uid));

        Console.WriteLine(email.Subject);

        // save all attachments to disk
        foreach(MimeData mime in email.Attachments)
        {
            mime.Save(mime.SafeFileName);
        }
    }
    pop3.Close();
}

Log

3.0.25027.1333
.NETFramework,Version=v4.8;NETFRAMEWORK;NET48;
47B7 Connecting to 'mail.TheGeneral.com:110', SSL/TLS: False.
47B7 S: +OK The Microsoft Exchange POP3 service is ready.
47B7 C: CAPA
47B7 S: +OK
47B7 S: TOP
47B7 S: UIDL
47B7 S: SASL PLAIN
47B7 S: USER
47B7 S: STLS
47B7 S: .
47B7 C: USER userMe@mycompany.com
47B7 S: +OK
47B7 C: PASS !user-me_Password#
47B7 S: -ERR Logon failure: unknown user name or bad password.

Exception thrown: 'Limilabs.Client.POP3.Pop3ResponseException' in Mail.dll
An unhandled exception of type 'Limilabs.Client.POP3.Pop3ResponseException' occurred in Mail.dll
Logon failure: unknown user name or bad password.

ago by

1 Answer

0 votes

"Logon failure: unknown user name or bad password." is the error returned by the server. It is not accepting your credentials.

Please double check for spelling mistakes.

Make sure POP3 protocol is turned on for your account. Please ask your email server administrator for server, port, and if SSL/TLS should be used.

ago by (302k points)
...