fail to send email

Datalink 0 Reputation points
2025-01-29T18:57:01.61+00:00

I have small python to test email.

With this code, if I use on my pc I can send email.

Is use this server (production server on near future, testing email for now) and does not work.

It's not firewall problem, because I can telnet to smtp.office365.com 587.

When I go to mailbox, I see that email failed to send due to this message in below.

Diagnostic information for administrators:

Generating server: DU0P251MB1009.EURP251.PROD.OUTLOOK.COM

******@epsmail.eu Remote server returned '550 5.7.708 Service unavailable. Access denied, traffic not accepted from this IP. For more information please go to http://go.microsoft.com/fwlink/?LinkId=526653 AS(8561) [DB9P251MB0220.EURP251.PROD.OUTLOOK.COM 2025-01-29T18:35:19.953Z 08DD3E67A7FFDF7A]'

Original message headers:

Received: from DU0P251MB1009.EURP251.PROD.OUTLOOK.COM
 ([fe80::9b0f:aaaf:6c4d:94]) by DU0P251MB1009.EURP251.PROD.OUTLOOK.COM
 ([fe80::9b0f:aaaf:6c4d:94%4]) with mapi id 15.20.8398.017; Wed, 29 Jan 2025
 18:35:20 +0000
MIME-Version: 1.0
Content-Type: text/plain
Date: Wed, 29 Jan 2025 18:35:20 +0000
Message-ID:
 <******@DU0P251MB1009.EURP251.PROD.OUTLOOK.COM>
Subject: Test Email
Microsoft Exchange Online
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Jake Zhang-MSFT 9,095 Reputation points Microsoft External Staff
    2025-01-30T02:49:32.55+00:00

    Hi @Datalink ,

    Welcome to the Microsoft Q&A platform!

    Based on your description, it looks like your IP address has been blocked by Office 365, which is causing emails to fail with the error message "550 5.7.708 Service Unavailable. Access Denied, Not Accepting Traffic from This IP". This can happen if the IP address is flagged for sending spam or other suspicious activity.

    Here are some steps you can take to fix this:

    1. Use the Office 365 Delisting Portal to see if your IP address is listed, and if so, request it be removed.
    2. If delisting the IP doesn't fix the issue, you may want to create a service request in the Office 365 Admin Center. They can provide more detailed assistance and help ensure your IP is not blocked.
    3. Make sure your emails comply with Office 365 policies to avoid being flagged in the future. This includes avoiding sending large volumes of emails in a short period of time and making sure your emails are not marked as spam.

    Please feel free to contact me for any updates. And if this helps, don't forget to mark it as an answer.

    Best,

    Jake Zhang


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.