---
title: Disable M365 Direct Send
description: "```cpp Get-OrganizationConfig | Select-Object Identity, RejectDirectSend ``` # Test Direct Send This requires a business internet circuit that does not restrict outbound SMTP on port 25. ```swift # Prompt for user inputs $email = Read-Host \"Enter your email address (e.g.,…"
url: "https://forsynse.com/kb/disable-m365-direct-send/"
updated: "2025-12-23"
category: Microsoft365
---

# Disable M365 Direct Send

```cpp

                Get-OrganizationConfig | Select-Object Identity, RejectDirectSend
```

# Test Direct Send
This requires a business internet circuit that does not restrict outbound SMTP on port 25.

```swift

                # Prompt for user inputs
$email = Read-Host "Enter your email address (e.g., user@yourdomain.com)"

$subject = "This is a test message using Direct Send"
$body = "Test using Powershell direct send"
$domain = Read-Host "Enter your root domain with no TLD (mycompanyemaildomain)"
$smtpServer = $domain + ".mail.protection.outlook.com"
$smtpPort = 25

# Send the email using Direct Send
Send-MailMessage -From $email -To $email -Subject $subject -Body $body -SmtpServer $smtpServer -Port $smtpPort
$smtpServer
```

# Validate M365 Direct Send Usage

To find emails sent via Direct Send, you can run a historical message trace in Exchange Online to pull up email delivery logs from the last 90 days. To do that,

- Navigate to the **[Exchange admin center](https://admin.exchange.microsoft.com/) > Reports > Mail flow** and select **Inbound messages report** from the list.
- Next, click on the **Request report** and modify the *Start & End date* based on your requirement.
- Click the *Recipients* dropdown and choose the desired recipients to receive the inbound message report.
- Then, ensure that **Received** and **No connector** are selected under *Directions* and *Connector type* appropriately.
- Finally, set TLS version to **No TLS** and hit **Request** to receive a report on all inbound emails received without a connector to identify Direct Send emails.

![Historical message trace in Exchange Online to check Direct Send email activities](https://blog.admindroid.com/wp-content/uploads/2025/08/Inbound-message-report-1024x551.png)
