locked
530 5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM RRS feed

  • Question

  • Hi, I'm try to setup smtp to send a emailout from a application but I keep getting this error "530 5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM"

    We dont have exchange on-promise only exchange online.

    The account i'm using does does existed in office365 and it does have E1 lincese.

    Also account does have "Manage email apps" -> Authenticated SMTP -> ticked

    How do I setup this account to send email through "smtp.office365.com on tcp port 587"


    Error.

    ERROR: Error on queue [queue.MailerTestQueue]: Mail processor cannot send mail. 530 5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM [LO3P265CA0006.GBRP265.PROD.OUTLOOK.COM] : 530 5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM [LO3P265CA0006.GBRP265.PROD.OUTLOOK.COM] 2020-07-13 12:11:30,448 Duration: 5070 ms Result: Error


    I try to test it with powershell script


    $cred = Get-Credential -UserName account@Domain.co.uk -Message "Enater Password for account"
    
    $mailParams = @{
        smtpServer         = "smtp.office365.com"
        Port               = '587'
        UseSSL=$true
        Credential = $cred
        From = "account@domain.co.uk"
        To="toaccount@domain.co.uk"
        Subject = "SMTP Relay"
        Body="Message SMTP Relay"
        DeliveryNotificationOption='onFailure','OnSuccess'
    }
    
    Send-MailMessage @mailParams

    But i got following error message

    Send-MailMessage : The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.57 SMTP; 
    Client was not authenticated to send anonymous mail during MAIL FROM [LO2P265CA0050.GBRP265.PROD.OUTLOOK.COM]
    At line:15 char:1
    + Send-MailMessage @mailParams
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: (System.Net.Mail.SmtpClient:SmtpClient) [Send-MailMessage], SmtpException
        + FullyQualifiedErrorId : SmtpException,Microsoft.PowerShell.Commands.SendMailMessage



    • Edited by lalaJee Tuesday, July 14, 2020 1:43 PM
    Tuesday, July 14, 2020 1:24 PM

All replies

  • Is the account protected by MFA, do you have security defaults enabled and/or legacy auth blocked?
    Tuesday, July 14, 2020 5:56 PM
  • Hi,

    Do you try to set up SMTP AUTH client submission to sending emails from the application?

    If so, you can check this article for more detail and make sure port, TLS and other requirements are set correctly in the application: How to set up SMTP AUTH client submission.

    This Microsoft Online: Exchange Online Forum will be migrating to a new home on Microsoft Q&A, please refer to this sticky post for more details.

    Regards,

    Lydia Zhou


    Microsoft Online: Exchange Online will be migrating to a new home on Microsoft Q&A! We invite you to post new questions in the new forum.

    For more information, please refer to the sticky post.

    Wednesday, July 15, 2020 4:28 AM
  • Hi,

    Do you try to set up SMTP AUTH client submission to sending emails from the application?

    If so, you can check this article for more detail and make sure port, TLS and other requirements are set correctly in the application: How to set up SMTP AUTH client submission.

    This Microsoft Online: Exchange Online Forum will be migrating to a new home on Microsoft Q&A, please refer to this sticky post for more details.

    Regards,

    Lydia Zhou


    Microsoft Online: Exchange Online will be migrating to a new home on Microsoft Q&A! We invite you to post new questions in the new forum.

    For more information, please refer to the sticky post.

    I can use same powershell script to send email using my account without any issue.

    I dont understand what is different between my account and this account

    Wednesday, July 15, 2020 8:10 AM
  • The mailbox requirement for SMTP AUTH client submission only is to have a licensed Microsoft 365 or Office 365 mailbox to send email from. 

    Since you didn't set to use your account for the application, your test result doesn't mean this issue is caused by the account account@Domain.co.uk itself. Your should be related to the configuration of the application or device. Your device must be able to use TLS1.2. As Vasil L. Michev mentioned, if you use SMTP AUTH client submission, please make sure Microsoft Security Defaults or multi-factor authentication is not used. 

    Additionally, you also can send email with the script by using another account. If it works as well, configure your application to use that account and test again.

    This Microsoft Online: Exchange Online Forum will be migrating to a new home on Microsoft Q&A, please refer to this sticky post for more details.

    Regards,

    Lydia Zhou


    Microsoft Online: Exchange Online will be migrating to a new home on Microsoft Q&A! We invite you to post new questions in the new forum.

    For more information, please refer to the sticky post.

    Thursday, July 16, 2020 7:33 AM
  • Hi,

    I'm trying to setup smtp to send email but it keep filing with this error message.

    ERROR: Error on queue [queue.MailerTestQueue]: Mail processor cannot send mail. 530 5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM [LO2P265CA0455.GBRP265.PROD.OUTLOOK.COM]
                : 530 5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM [LO2P265CA0455.GBRP265.PROD.OUTLOOK.COM]

    One the server which i'm using the send email is allow to tlak to smtp.office365.com on port 587

    User name and password is correct i check it few times.

    Check the account in office 365 and authenticated SMTP is ticked(enabled)

    I cant see any errrors or login failure in azure ad for the account.

    I dont know why this is failing to send email using smtp.office365.com

    Wednesday, July 22, 2020 12:11 PM
  • Hi,

    Thanks for visiting our forum, we noticed that you already created a similar thread before, here we will help you merge this case to that one for further troubleshooting. Thanks for your understanding!

    This Microsoft Online: Exchange Online Forum will be migrating to a new home on Microsoft Q&A, please refer to this sticky post for more details.

    Regards,

    Joyce Shen


    Microsoft Online: Exchange Online will be migrating to a new home on Microsoft Q&A! We invite you to post new questions in the new forum.

    For more information, please refer to the sticky post.

    Thursday, July 23, 2020 1:54 AM
  • Just checking in to see if above information was helpful. If you have any questions or need further help on this issue, please feel free to post back. 

    This Microsoft Online: Exchange Online Forum will be migrating to a new home on Microsoft Q&A, please refer to this sticky post for more details.

    Regards,

    Lydia Zhou


    Microsoft Online: Exchange Online will be migrating to a new home on Microsoft Q&A! We invite you to post new questions in the new forum.

    For more information, please refer to the sticky post.

    Thursday, July 23, 2020 9:13 AM
  • We do the smtp relay setup in office 365 I try to use telnet to see if I can send email or not but i got this error.

    I checked with verdor of the application and they confirm the application is using tls

    Following settings are entered into application.

    smtp.office365.com

    587

    useraname & password -> User has E1 lincese

    220 CWLP265CA0372.outlook.office365.com Microsoft ESMTP MAIL Service ready at Mon, 27 Jul 2020 08:31:06 +0000
    EHLO main domain
    250-CWLP265CA0372.outlook.office365.com Hello [xx.xxx.xx.xx]
    250-SIZE 157286400
    250-PIPELINING
    250-DSN
    250-ENHANCEDSTATUSCODES
    250-STARTTLS
    250-8BITMIME
    250-BINARYMIME
    250-CHUNKING
    250 SMTPUTF8
    AUTH LOGIN
    504 5.7.4 Unrecognized authentication type [CWLP265CA0372.GBRP265.PROD.OUTLOOK.COM]

    • Edited by lalaJee Monday, July 27, 2020 8:36 AM
    Monday, July 27, 2020 8:34 AM
  • In general, we use Telnet to test SMTP messages with port 25 instead of 587. However, we can use it to verify if we can connect successfully to Office 365. Your output "220 CWLP265CA0372.outlook.office365.com Microsoft ESMTP MAIL Service ready at Mon, 27 Jul 2020 08:31:06 +0000" shows you can connect to O365. For your reference: Fix issues with SMTP client submission.

    Do you also use Send-MailMessage with other mailboxes, and change to configure your application with the mailbox works well with Send-MailMessage? Does your application work this time?

    If the issue persists, try to disable and re-enable SMTP AUTH for your organization or a specific mailbox:

    Set-TransportConfig -SmtpClientAuthenticationDisabled <$true | $false> Set-CASMailbox -Identity username -SmtpClientAuthenticationDisabled <$true | $false | $null>

    You can check this for more details: Enable or disable authenticated client SMTP submission (SMTP AUTH) in Exchange Online.

    This Microsoft Online: Exchange Online Forum will be migrating to a new home on Microsoft Q&A, please refer to this sticky post for more details.

    Regards,

    Lydia Zhou


    Microsoft Online: Exchange Online will be migrating to a new home on Microsoft Q&A! We invite you to post new questions in the new forum.

    For more information, please refer to the sticky post.

    Tuesday, July 28, 2020 9:27 AM
  • [Note] This forum will be locked down, you can continue to post in here before 8/10/2020. It is highly recommended to register the Microsoft Q&A Platform and create new thread in Microsoft Q&A Platform to continue the discussion.

    Any updates so far? If you have solved your problem, could you share with us? Maybe it will help more people with similar problems. 

    This Microsoft Online: Exchange Online Forum will be migrating to a new home on Microsoft Q&A, please refer to this sticky post for more details.

    Regards,

    Lydia Zhou


    Microsoft Online: Exchange Online will be migrating to a new home on Microsoft Q&A! We invite you to post new questions in the new forum.

    For more information, please refer to the sticky post.

    Friday, August 7, 2020 8:18 AM