Mail指定退回地址

Mail指定退回地址

本文介绍了如何使用System.Net.Mail指定退回地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在通过System.Net.Mail发送电子邮件时,我们需要指定退回地址,我知道这可以通过sender属性实现,但是它与JavaMail API中的email.setBounceAddress(emailAddressString)属性相同吗?如果不是,那么通过.Net的方式是什么.

We have a requirement to specify bounce address while sending the email through System.Net.Mail, I understand that this can be achived by sender property but is it the same as the email.setBounceAddress(emailAddressString) property in JavaMail API? If it is not then what is the way to do it through .Net.

推荐答案


EmailMessage msg = new EmailMessage();
msg.ReversePath = "[email protected]


在SMTP会话期间,aspNetEmail将在MAIL FROM命令中使用ReversePath值.我可以轻松地将此属性称为"ReturnPath"或"EnvelopeFrom".


aspNetEmail will use the ReversePath value in the MAIL FROM command during the SMTP Session. I could have easily of called this property "ReturnPath" or "EnvelopeFrom".

这可能会帮助...

谢谢...

It may help...

Thanks...


这篇关于如何使用System.Net.Mail指定退回地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-23 17:55