Send-MailMessage

This topic contains 2 replies, has 2 voices, and was last updated by Profile photo of Adrian Mihai Martin Adrian Mihai Martin 2 years ago.

  • Author
    Posts
  • #20796
    Profile photo of Adrian Mihai Martin
    Adrian Mihai Martin
    Participant

    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.

  • #20802
    Profile photo of Dave Wyatt
    Dave Wyatt
    Moderator

    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
    Profile photo of Adrian Mihai Martin
    Adrian Mihai Martin
    Participant

    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

You must be logged in to reply to this topic.