Office365 - smtp authentication - failure

Peters, Marvin 21 Reputation points
2020-08-24T09:51:44.807+00:00

Hello Everybody,

I have problems to post a question with screenshots here (Access denied). So maybe someone have an answer on this question:

https://techcommunity.microsoft.com/t5/office-365/failure-by-sending-an-email-with-smtp-authentication/m-p/1607588

Thanks in advance

Best regards
Marvin Peters

Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
4,586 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Dominique Pollard 46 Reputation points
    2020-08-24T11:47:40.487+00:00

    Are you in hybrid?

    Have you tried to send an email from gmail or hotmail to your tenant?

    0 comments No comments

  2. Peters, Marvin 21 Reputation points
    2020-08-24T12:50:00.903+00:00

    Thanks for your answer.

    Yes, we are hybrid.

    The problem is, that we have a ticket-tool (third party) which has to send emails via basic authentication (smtp authentication).

    Receiving mails isn´t the problem.

    0 comments No comments

  3. Joyce Shen - MSFT 16,671 Reputation points
    2020-08-25T06:02:43.903+00:00

    In addition to the suggestion provided by michev in your original thread, please also try using the command below to test the account again:

    $EmailFrom = “myaccount@domain.com”  
    $EmailTo = “emailaddress@domain.com”  
    $Subject = “Test from O365 SMTP”  
    $Body = “Test from O365 SMTP Authentication”  
    $SMTPServer = “smtp.office365.com”  
    $SMTPClient = New-Object Net.Mail.SmtpClient($SmtpServer, 587)  
    $SMTPClient.EnableSsl = $true  
    $SMTPClient.Credentials = New-Object System.Net.NetworkCredential(“myaccount@domain.com”, “*****”);  
    $SMTPClient.Send($EmailFrom, $EmailTo, $Subject, $Body)  
    

    20141-snipaste-2020-08-25-13-57-03.png20086-snipaste-2020-08-25-13-57-22.png

    please check the following requirements for SMTP client submission:

    1. Authentication: You must be able to configure a user name and password to send email on the device.
    2. Mailbox: You must have a licensed Office 365 mailbox to send email from.
    3. Transport Layer Security (TLS): Your device must be able to use TLS version 1.0 and above.
    4. Port: Port 587 or port 25 is required and must be unblocked on your network.

    And the official document here about How to set up a multifunction device or application to send email using Microsoft 365 or Office 365


    If the response is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.