Welcome Forums General PowerShell Q&A Send-MailMessage

This topic contains 2 replies, has 2 voices, and was last updated by

4 years, 1 month ago.

  • Author
  • #20796

    Points: 0
    Rank: Member


    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?


    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.

  • #20802

    Points: 0
    Rank: Member

    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.)

  • #20827

    Points: 0
    Rank: Member

    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

The topic ‘Send-MailMessage’ is closed to new replies.