Sending an email with the header return-path using windows virtual mail server

前端 未结 1 1023
一个人的身影
一个人的身影 2021-01-13 12:53

I\'m trying to send an email message using the .NET MailMessage class which can also have the return-path header added so that any bounces come back to a different email add

相关标签:
1条回答
  • 2021-01-13 12:59

    The Return-Path is set based on the SMTP MAIL FROM Envelope. You can use the Sender property to do such a thing.
    Another discussion on a related issue you will have sooner or later: How can you set the SMTP envelope MAIL FROM using System.Net.Mail?

    And btw, if you use SmtpDeliveryMethod.PickupDirectoryFromIis, the Sender property is not used as a MAIL FROM; you have to use Network as a delivery method to keep this value. I did not find any workaround for this issue.
    PickupDirectoryFromIis, Sender property and SMTP MAIL FROM envelope

    0 讨论(0)
提交回复
热议问题