Author Posts

November 25, 2014 at 6:03 am

Hi,

I am successfully running a Send-MailMessage. I was wondering if there is any way to log everything like smtp logs. Unfortunately, all my tests failed.
Do you know of any way?

BR
Adrian

P.S. Or do I understand it wrong? I am expecting to see which MX was found for the recipient, what was the server response etc.

November 25, 2014 at 6:45 am

Between your client and your SMTP server, there's nothing happening related to looking up MX records. You just send the message to the SMTP server and tell it the recipients; it says "OK" and the connection is ended. If you want to know what happened between the SMTP server and the recipient, you'd have to have some sort of logging on the server (and even then you might not get everything; emails sometimes wind up passing through more than one relay.)

November 26, 2014 at 3:27 am

Thank you for the reply Dave.
I was thinking the same..when specifying the Credentials, powershell will actually submit the mail item to the mailbox server and afterwards it will go through the transport agents and get submitted to the recipient..hence, no details for this cmdlet.

Best regards