如何使用System.Net.Mail指定退回地址 [英] How to specify bounce address using System.Net.Mail

查看:94
本文介绍了如何使用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.

推荐答案

据我所知,System.Net.Mail类不支持退回邮件.我找到了可以替代的替代方法:
http://www.afterlogic.com/mailbee-net/email-components [ ^ ]
或对于ASP.NET:
http://www.aspnetemail.com/ [ ^ ]
As far as I know, the System.Net.Mail classes do not support bounce mails. I found an alternative that you may use instead:
http://www.afterlogic.com/mailbee-net/email-components[^]
Or for ASP.NET:
http://www.aspnetemail.com/[^]


您可以通过
You can go through How to set the bounce address using System.Net.Mail?[^].

According to this question and discussion

为此,您需要使用一个第三方SMTP对象,例如我写的那个对象:

http://www.aspnetemail.com

在aspNetEmail中,您可以执行以下操作:

To do something like this, you would need to use a 3rd party SMTP object like the one I wrote:

http://www.aspnetemail.com

In aspNetEmail, you can do something like:
EmailMessage msg = new EmailMessage();
msg.ReversePath = "bounceEmailAccountHere@whatever.com


在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指定退回地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆