Has anybody else had an issue with the sender address not being used as the return-path/bounce address when using system.net.mail to send email with a different address for the return-path/sender and the from address and using the SpecifiedPickupDirectory delivery method? This issue is particularly important when you need to send mail from a "user" address, but want bounce backs to come to a different address so they can be processed.
Using the code below, I think you can reproduce the issue.
Partial Class emailtest
Protected Sub test_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles test.Click
' Build Message
Dim mail As New MailMessage
mail.From = New MailAddress("email@example.com")
mail.Sender = New MailAddress("firstname.lastname@example.org")
mail.Subject = "Test Subject"
mail.Body = "Test Body"
' Drop in Pickup Directory
Dim smtpPK As New SmtpClient
smtpPK.DeliveryMethod = SmtpDeliveryMethod.Sp
View Complete Post