回答
将MailMessage的DeliveryNotificationOptions属性设置为
System.Net.Mail.DeliveryNotificationOptions.OnSuccess
;
或尝试:
static void ReadReceipts()
{
//create the mail message
MailMessage mail = new MailMessage();
//set the addresses
mail.From = new MailAddress("[email protected]");
mail.To.Add("[email protected]");
//set the content
mail.Subject = "This is an email";
mail.Body = "this is the body content of the email.";
//To request a read receipt, we need add a custom header named 'Disposition-Notification-To'
//in this example, read receipts will go back to '[email protected]'
//it's important to note that read receipts will only be sent by those mail clients that
//a) support them
//and
//b)have them enabled.
mail.Headers.Add("Disposition-Notification-To", "<[email protected]>");
//send the message
SmtpClient smtp = new SmtpClient("127.0.0.1");
smtp.Send(mail);
}
知道某人是否收到电子邮件的唯一方法是让他们以某种方式通知您(阅读收件人或类似内容)。
这就是为什么所有的电子邮件确认方案总是需要点击链接以确认它是您的电子邮件。
这是确定的,但有时会同时注册,如果用户没有收到确认电子邮件(以链接激活帐户的电子邮件),我们怎么能知道这件事,因为我没有从SmtpClient类方法中得到任何异常。 – gaurav 2010-09-17 10:33:49
您无法知道他们是否收到了邮件,即使邮件从您的服务器发送出去,它可能会在途中丢失(包括他的电子邮件提供商可能因某种原因已将您的电子邮件提供商列入黑名单,并自动删除所有电子邮件)。我建议在用户注册之后,如果您在x分钟内没有收到邮件,请在邮件中显示“'”,请检查您的垃圾邮件文件夹,或尝试重新发送邮件,或重新发送邮件至另一个电子邮件地址“'。 – 2010-09-17 10:40:02
- 1. 有没有办法知道用户是否打开邮件?
- 2. 有没有办法知道ExecutorService是否成功结束?
- 3. 有没有什么办法可以知道Outlook 2010是否有新的C#电子邮件#
- 4. 有没有办法知道用户是否发送了短信?
- 5. 如何知道我是否使用System.Net.Mail成功发送电子邮件
- 6. 有没有办法知道timerTask是否已完成?
- 7. 有没有办法知道文件名是否是Excel格式?
- 8. 有没有办法判断电子邮件是否有OneDrive附件?
- 9. 有没有办法用电子邮件gem来测试电子邮件连接?
- 10. 有没有办法阻止MFMailComposeViewController发送电子邮件?
- 11. 有没有办法从mysql发送电子邮件
- 12. iPhone - 有没有办法知道引用是否(仍然)有效?
- 13. 有没有办法知道谁是“setNeedsDisplay”的发件人?
- 14. 我如何知道是否有人打开了电子邮件?
- 15. 有没有办法知道Data Saver是否启用?
- 16. 有没有办法知道异常是否被禁用?
- 17. 有没有办法知道一个对象的C#方法是否被调用?
- 18. 有没有办法知道手机是否有通话?
- 19. 有没有办法检测Outlook邮件是否没有附件?
- 20. 有没有办法确定电子邮件是否到达目的地?
- 21. 有没有办法测试一个电子邮件地址是否存在而不发送测试邮件?
- 22. Swift_Mailer认证并发送成功,但没有电子邮件
- 23. phpmailer成功,但没有发送电子邮件
- 24. ColdFusion电子邮件 - 是否有方法确认电子邮件已发送?
- 25. 有没有办法知道一行是否更新?
- 26. 有没有办法知道Flash Player是否安装了SWFObject?
- 27. 有没有办法知道rxjs websocket是否打开
- 28. 有没有办法知道HttpResponse是否在Https中?
- 29. 有没有办法知道是否已经创建了IWin32Window?
- 30. 有没有办法知道$ http请求是否超时?
我可以设置多个DeliveryNotificationOptions吗?谢谢。 – gaurav 2010-09-17 12:03:22
@gaurav - 没有试过那个 – 2010-09-17 12:07:28
许多服务器 - 尤其是企业服务器 - 阻止传送报告,因为它们揭示了哪些电子邮件地址是有效的,因此可能导致垃圾邮件。 – 2010-09-17 12:32:55