+1 vote

The exception we are getting is 5.5.1 Invalid command:

Limilabs.Client.ServerException: 5.5.1 Invalid command
   at Limilabs.Client.SMTP.Smtp.[1](String [1], Boolean
)
   at Limilabs.Client.SMTP.Smtp.LoginDIGEST(String user, String password)
   at Limilabs.Client.SMTP.Smtp.UseBestLogin(String user, String password)
   at ..Forms.ComposeEmailForm.SendEmail()

The SMPT settings are as follows:

Outgoing mail server: smtp.livemail.co.uk
Port: 25
Use SSL: false

Please let me know if you need any further details. I look forward to your reply.

by

1 Answer

0 votes

livemail.co.uk incorrectly advertises CRAM-MD5 login method:

The server response is misleading:

S: 250-AUTH LOGIN PLAIN CRAM-MD5 **DIGEST-MD5**
S: 250-ENHANCEDSTATUSCODES
S: 250-8BITMIME
250-DSN
250 AUTH PLAIN LOGIN CRAM-MD5

Notice that it sends DIGEST-MD5 in one AUTH response and it doesn't send it in the followup.

This causes Mail.dll to use it:

C: AUTH DIGEST-MD5

and fails:

S: 500 5.5.1 Invalid command

AUTH PLAIN and AUTH LOGIN methods do work without any problems:

AUTH LOGIN:

using (Smtp client = new Smtp())
{
    client.Connect("smtp.livemail.co.uk");
    client.Login("user", "pass");
    client.Close();
}

AUTH PLAIN:

using (Smtp client = new Smtp())
{
    client.Connect("smtp.livemail.co.uk");
    client.LoginPLAIN("user", "pass");
    client.Close();
}
by (301k points)
...