We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How to set the email envelope from address with Aspose.Network component (ReversePath)

Hi,

Some of our clients ask to us to manually set the envelope from address.

Can you tell me how I do that with Aspose.Network ?

For information with aspNetEmail conponent, you can do this with the ReversePath property :

http://www.aspnetemail.com/help/aspnetemail.emailmessage.reversepath.html

Thanks

PS : Sorry for the link, this is not an advertising, remove it, if it cause problems.

Hello,

Thanks for your considering Aspose.

You can use Sender property of the MailMessage class to set the ReversePath as aspnetmail. for example:


MailMessage msg = new MailMessage();
msg.Sender = "sender@gmail.com";
msg.From = from@gmail.com";
msg.To = recipient@gmail.com;
Moreover, the MailMessage also provides more support for email header. You can feel free to add any custom mail header like

MailMessage msg = new MailMessage();
msg.From = "from@gmail.com";
msg.To = "recipeint@gmail.com";
msg.Headers["return-path"] = new MimeHeader("return-path", sender@gmail.com);

Thanks,

Thanks Iret