config smtp relay to send email to anonymous users

Copper Contributor

Got testing email when run below command.



Send-MailMessage -To outside user mailbox -from your tenant user mailbox -Subject 'Test message' -smtpserver -usessl -Credential $cred -Port 587 (Set the sender to the user mailbox for SMTP)


So refer to

and tried to setup SMTP relay for application devices to send email to external domain like Yahoo/Gmail but failed.


Already ran the permission amendment command:

Set-ReceiveConnector <> -PermissionGroups AnonymousUsers 

Get-ReceiveConnector <> | Add-ADPermission -User "NT AUTHORITY\ANONYMOUS LOGON" -ExtendedRights "Ms-Exch-SMTP-Accept-Any-Recipient" 


Current status is telnet from application device can got message like "Sender OK", "Recipient OK", "1583 bytes in 2.814,0.549 KB/sec Queued mail for delivery" when rcpt to: xxx@externaldomain but the email haven't send out and message log not found the transaction.


How to trace it? 

Thank you for advice.

0 Replies