We are trying to send an Email using Limilab SMTP class and we are getting this Error:
504 5.7.4 Unrecognized authentication type
The Code we are using is the following:
Smtp smtpClient = new Smtp();
MailBuilder builder = new MailBuilder();
builder.From.Add(new MailBox("support@something.com"));
builder.To.Add(new MailBox("notifications@something.com"));
builder.Subject = "Test";
builder.Text = "";
IMail email = builder.Create();
smtpClient.Connect("mail.something.com");
bool supportsTLS = smtpClient.SupportedExtensions()
.Contains(SmtpExtension.StartTLS);
if (supportsTLS)
{
smtpClient.StartTLS();
}
smtpClient.UseBestLogin("support", "something");
ISendMessageResult result = smtpClient.SendMessage(email);
This is the Logs from the Logging File:
Mail.dll Information: 0 : 1 09:19:53 3.0.18026.1647
Mail.dll Information: 0 : 1 09:19:53 Checking if license file is present.
Mail.dll Information: 0 : 1 09:19:53 Connecting to 'mail.something.com:587', SSL: False.
Mail.dll Information: 0 : 1 09:19:53 S: 220 someting.something.local Microsoft ESMTP MAIL Service ready at Thu, 8 Mar 2018 09:19:52 -0500
Mail.dll Information: 0 : 1 09:19:53 C: EHLO [66.24.149.99]
Mail.dll Information: 0 : 1 09:19:53 S: 250-someting.something.local Hello [66.54.154.111]
Mail.dll Information: 0 : 1 09:19:53 S: 250-SIZE 36700160
Mail.dll Information: 0 : 1 09:19:53 S: 250-PIPELINING
Mail.dll Information: 0 : 1 09:19:53 S: 250-DSN
Mail.dll Information: 0 : 1 09:19:53 S: 250-ENHANCEDSTATUSCODES
Mail.dll Information: 0 : 1 09:19:53 S: 250-STARTTLS
Mail.dll Information: 0 : 1 09:19:53 S: 250-8BITMIME
Mail.dll Information: 0 : 1 09:19:53 S: 250-BINARYMIME
Mail.dll Information: 0 : 1 09:19:53 S: 250 CHUNKING
Mail.dll Information: 0 : 1 09:19:53 C: STARTTLS
Mail.dll Information: 0 : 1 09:19:53 S: 220 2.0.0 SMTP server ready
Mail.dll Information: 0 : 1 09:19:53 C: EHLO [66.24.149.99]
Mail.dll Information: 0 : 1 09:19:53 S: 250-someting.something.local Hello [66.54.154.111]
Mail.dll Information: 0 : 1 09:19:53 S: 250-SIZE 36700160
Mail.dll Information: 0 : 1 09:19:53 S: 250-PIPELINING
Mail.dll Information: 0 : 1 09:19:53 S: 250-DSN
Mail.dll Information: 0 : 1 09:19:53 S: 250-ENHANCEDSTATUSCODES
Mail.dll Information: 0 : 1 09:19:53 S: 250-8BITMIME
Mail.dll Information: 0 : 1 09:19:53 S: 250-BINARYMIME
Mail.dll Information: 0 : 1 09:19:53 S: 250 CHUNKING
Mail.dll Information: 0 : 1 09:19:53 C: AUTH LOGIN
Mail.dll Information: 0 : 1 09:19:53 S: 504 5.7.4 Unrecognized authentication type