System.Net.Mail-我如何接收退回邮件? [英] System.Net.Mail - How i'm able to receive bouncemails?

查看:71
本文介绍了System.Net.Mail-我如何接收退回邮件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我的应用程序发送带有自动生成的发件人地址的新闻通讯,因为如果其中一个收件人无法访问,我想知道那是哪个新闻通讯.
当我使用system.net.mail连接到Mailserver时,目前我没有凭据(它们是稍后生成的).

发送电子邮件时,它无需凭据即可工作(邮件的发件人属性在整个过程的不同步骤中进行了设置,因此邮件具有正确的发件人地址,但不是从该帐户发送的.)的发送而无需身份验证)

但是,通常在无法联系到收件人的情况下,我会在邮箱中收到退回邮件,但在这种情况下不会.

当我通过telnet在端口25上连接到邮件服务器(也没有用户身份验证)并发送带有此senderaddress的电子邮件(在这种情况下以及通过我的应用程序发送的情况下,该帐户存在)
bouncemail在发件人邮箱中.

实际上,退回邮件总是发送给电子邮件的发件人,并且成功发送的邮件包含正确的发件人邮件地址.

最后,我想原谅我的英语不好,
我希望你们中的某人可以帮助我

问候

Hello,

My application sends newsletter with automatically generated sender - addresses, because if one of the recipients is not reachable, i want to know which newsletter that was.
When I connect to a Mailserver using system.net.mail, i do not have credentials at this time (they are generated later).

when the e-mail is sent, it works without credentials (the sender attribute of the message is set in a different step of the whole process, so the mail has the right sender address, but is not sent from this account. instead it''s sent without authentification)

however, normally when a recipient is not reachable, i get a bouncemail into my mailbox, but in this case not.

when i connect to the mailserver via telnet on port 25 (also without user authentification) and send an e-mail with this senderaddress (the account exists in that case and in case of sending over my application)
the bouncemail is in the senders mailbox.

In fact, bouncemails are always sent to the sender of an e-mail, and the mails which are sent successfully contain the right sender mail address.

in the end i want to excuse my bad english,
i hope someone of you can help me

regards

推荐答案

我非常怀疑您是否可以在没有发件人的用户帐户详细信息的情况下收到退回的邮件.

外发邮件利用SMTP
传入邮件利用POP3

在这种情况下,看起来传出的SMTP服务器充当了开放中继,而无需进行身份验证.

被退回的邮件将必须通过POP接收,并且需要用户帐户详细信息才能访问邮箱.

[可能可以设置与发送地址不同的Reply-To,然后从您有权访问的邮箱中提取它,但是我不确定退回是否仅发给原始发件人,或者可以使用回复.]
I very much doubt you can get the bounced mails without the user account details of the sender.

Outgoing mail utilises SMTP
Incoming mail utilises POP3

It looks like in this instance the outgoing SMTP server is acting as an open relay without the need for authentication.

The bounced mail will have to be received with POP, and will need the user account details to access the mailbox.

[It might be possible to set a Reply-To different from the sending address and pick it up from a mailbox for which you have access, but i''m not sure if the bounce back goes to the originator only or can be redirect using the reply to.]


在发送电子邮件之前,您可以执行一些检查邮件是否有效的操作.

对电子邮件地址运行正则表达式匹配
通过查找DNS确认域存在
与目标服务器模拟smtp握手,并检查电子邮件地址.

以下是一篇文章,报告了要做所有这些事情.

http://www.codeproject.com/KB/validation/Valid_Email_Addresses.aspx

邮件发送后,您可以连接以进行交换并搜索收件箱. Exchange有一个可在.Net环境中使用的SDK.

以下是到Microsoft Exchange SDK文档的链接

http://www.microsoft.com/downloads/details.aspx?FamilyID=5ca18d40-5a37-4a20-94ae-6a6cf6cb846d&displaylang=en
There are a few things you can do to check if an e-mail is valid before you send the mail.

Run a regex match against the e-mail address
Confirm the domain exists by doing a dns look up
Simulate an smtp handshake with the target server and check the e-mail address.

The following is an article which reports to do all these things.

http://www.codeproject.com/KB/validation/Valid_Email_Addresses.aspx

After the mail is sent you can connect to exchange and search the inbox. Exchange has an SDK which can be used in the .Net environment.

The following as a link to microsofts Exchange SDK documentation

http://www.microsoft.com/downloads/details.aspx?FamilyID=5ca18d40-5a37-4a20-94ae-6a6cf6cb846d&displaylang=en


这篇关于System.Net.Mail-我如何接收退回邮件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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