Why can't I use the Powershell command Send-MailMessage from a given server?
Yeah - have your exchange admin review the SMTP logs on the CAS server(s). Reviewing the logs is always the first thing to do.
FYI - send-mailmessage
will use your own AD credentials if you don't specify any, so you might be running into a problem where the receive connector is only allowing anonymous connections but you're using an authenticated session. Just a guess.
/Edit The log files will be found at either the location where you have defined them (find it using Get-TransportServer |select name, ReceiveProtocolLogPath
), or via get-messagetracking
. Assuming the receive connectors have logging enabled, which you should do.
Related videos on Youtube
Keith
Updated on September 18, 2022Comments
-
Keith almost 2 years
I'm trying to use the following command (without the line break) to relay email through an Exchange 2013 server from another server. The sending server is listed with explicit permission to relay anonymous email and the same command used to work a few months ago.
Send-MailMessage -To [valid email group] -From [throwaway address] -Subject "Test Only" -SmtpServer [valid URI to server] -body "Testing"
The result of the command is that nothing happens. No error, no email, nothing. I'm not the Exchange admin and he says we've installed updates and such but we can't correlate one update or session to this failure. Any troubleshooting tips? Thanks.
-
Keith over 9 yearsThanks. Is there a reference for the log files? I have access to them but no idea which ones to check.
-
kralyk over 9 years@Keith - the message tracking logs are your first stop. If that doesn't show anything then enable verbose logging on the Receive connector and then check those logs. If you aren't sure which ones those are though then that's best asked of your Exchange admin.
-
mfinni over 9 years(all the receive connectors - it might be getting caught by an unexpected one)
-
mfinni over 9 yearsEdited answer for log files