Office365 SMTP: 5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM

Please check out Client was not authenticated to send anonymous mail through Office 365 for the latest information on this topic.

Hi,

We use the Office365 SMTP server to send e-mails

Most of the times this works without problems but every now and then it does not and we receive the following response:

5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM [xxx.eurprd07.prod.outlook.com]

If we then try again to send the same mail in exactly the same way (with the same credentials and settings) it works or sometimes we get the same error but then with a different FROM address. Like this:

5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM [AMxxx0007.eurprd07.prod.outlook.com]

5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM [AMxxx0028.eurprd07.prod.outlook.com]

5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM [AMyyy0063.eurprd01.prod.exchangelabs.com]

5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM [AMxxx0019.eurprd07.prod.outlook.com]

(I replaced possible sensitive information with 'xxx' or 'yyy')

So we send all these mails in exactly the same way with the same credentials, security settings, host, port, from address, etc. and most of the times it works but sometimes it does not.

Who can help us? 

Hello Corne,

 

Based on your description, I assume that you are using SMTP client submission to send emails. Am I correct?

How to set up a multifunction device or application to send email using Office 365

 

If yes, please make sure that port 587 is allowed in your firewall settings and TLS is enabled. To check if the SMTP service is working fine, please set up the account via POP/IMAP in the Outlook client and check if you can successfully send a test email using the Outlook client.

POP and IMAP account settings

 

Also, please try using another valid Office 365 mail account as the logon credential and check if the problem can be solved.

 

Finally, please give us a screenshot of the detailed application settings so we can check if they are all correct from our side.

 

Thanks,

Barry

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Hi Barry,

Thanks for your answer.

Yes, I am using SMTP client submission.

This is the c# code:

                var smtpClient = new SmtpClient()
                {
                    Host = "smtp.office365.com",
                    Port = 587,
                    UseDefaultCredentials = false,
                    EnableSsl = true
                };

                smtpClient.Credentials = new NetworkCredential("*** Email address is removed for privacy ***", "xxxxx");

                var message = new MailMessage
                {
                    From = new MailAddress("*** Email address is removed for privacy ***"),
                    Sender = new MailAddress("*** Email address is removed for privacy ***"),
                    Subject = "Test mail",
                    IsBodyHtml = false
                };
                message.To.Add("*** Email address is removed for privacy ***");

                message.Body = "This is a test mail. ";

                smtpClient.Send(message);

The problem is that this code is working fine most of the time; we are sending hundreds of mails every day like this without any problem. But every now and then the SMTP server returns this error and when we try to send the same mail again it sometimes succeeds and sometimes fails again.

I don't think the problem is releated to the settings at out side since it is working most of the times. 

4 people found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Hello Corne,

Many thanks for your quick response.

If you are using SMTP client submission to send emails, we’d like to let you know that there is a limitation in this situation. 
You can only send from one email address unless your device can store login credentials for multiple Office 365 mailboxes. Office 365 imposes a limit of 30 messages sent per minute, and a limit of 10,000 recipients per day.

Please kindly check if your sending rate is higher than 30 messages per minute.

Regards,
Barry

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Hello Barry,

I can confirm that the limit of 30 messages per minute is not the problem. We have constructed our SMTP client in such a way that it will never send more than 26 messages each minute.

Sometimes the problem occurs after a few minutes of inactivity, so the 30 messages limit is not the cause of the problem. I also would expect another error message in that case.

The limit of 10,000 recipients is also not the problem because most of the times the problem occurs once. After a retry, a few seconds later, the delivery succeeds most of the times.

We do not use a fixed sender address but always a sender address in the same domain. When I use a sender address from another domain I get the error: 5.7.60 SMTP; Client does not have permissions to send as this sender. Since my current problem is about another error message I guess the sender address is not the cause.

I hope you have other suggestions.

1 person found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Hi Corne,

 

For further investigating, could you please test whether this problem also occurs when you only use the Outlook client? We’d like to know if this problem is related to Outlook client or the SMTP server.

 

Regards,

Barry

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

I'm having this problem.

In my case, I've been using the smtp server to send messages for the past couple of years with no problem.  However, something happened, and since late July, messages haven't been sent.

So I made a dummy ASP page, got 

5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM

I do not believe I have made any changes that would have cause previously-functioning code to stop functioning.

1 person found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Hi Corne,

For further investigating, could you please test whether this problem also occurs when you only use the Outlook client? We’d like to know if this problem is related to Outlook client or the SMTP server.

Regards,

Barry

The previous user didn't mention anything, but I can say that logging in through office 365 and sending an e-mail through Outlook works just fine.

1 person found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated April 3, 2024 Views 78,601 Applies to: