How to set a Returnpath in SMTP email sending

Asked

Viewed 57 times

2

I’m making a console that sends emails.

I need the emails sent with error to return to another email (other than the one sent).

I managed to set the ReturnPath in the header email, but it didn’t work.

I’m using the library: System.Net.Mail.

Creation of my e-mail message:

código

Note that the Return-Path changed, and is different from the email you sent.

resultado

E-mail you sent:

resultado

I tried to put right into the header, but then the Return-Path neither changes.

mail.Headers.Add("Return-Path", "[email protected]");

1 answer

2

  • So... I tried to use it already, but this way it doesn’t even change in the details of the message...

  • But it’s the only way, it may be that you’re doing something wrong that’s affecting.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.