What is Direct Send in Microsoft 365?
Direct Send is a method used to send emails directly to an Exchange Online customer’s hosted mailboxes from on-premises devices, applications, or third-party cloud services using the customer’s own accepted domain. This method does not require any form of authentication because, by its nature, it mimics incoming anonymous emails from the internet, apart from the sender’s domain.
- Install-Module -Name ExchangeOnlineManagement -Force
- Connect-ExchangeOnline
- Set-OrganizationConfig -RejectDirectSend $true
- Get-OrganizationConfig | Select-Object Identity, RejectDirectSend
Test reject Direct Send in Microsoft 365:
$EmailMessage = @{
To = “[email protected]"
From = “[email protected]"
Subject = “Test email”
Body = “Test email for Direct Send”
SmtpServer = “exoip-com.mail.protection.outlook.com”
Port = “25”
UseSSL = $true
}
Send-MailMessage @EmailMessage
Comments are closed