C#:如何添加已读通知 [英] C#: How to add read notifications

查看:79
本文介绍了C#:如何添加已读通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



在这里,我正在开发一个使用c#发送邮件的桌面应用程序.在那我想添加邮件阅读通知.我已经使用了下面的代码,但无法正常工作. -非常感谢您的帮助.

邮件正在发送,但是我没有收到任何已读通知.

Hi,

Here I am developing one desktop application using c# for sending mails. In that I want to add mail read notification. I have used the code below but it is not working. -- any help is greatly appreciated.

Mail is going, but i am not getting any read notification.

using System.Net.Mail;

MailMessage Msg = new MailMessage();
Msg.From =new System.Net.Mail.MailAddress("FromID");
Msg.To.Add("ToId");
Msg.Subject = "hai";
Msg.Body = "sss";
Msg.Headers.Add("Disposition-Notification-To", "ReturnID");
SmtpClient smtp = new SmtpClient("servername",port);

smtp.UseDefaultCredentials = false;
smtp.Credentials = new NetworkCredential("sendingID", "MyPwd","Domain");

smtp.Host = "Hostname";

smtp.Send(Msg);




谢谢
Sujith




Thanks
Sujith

推荐答案

并非所有电子邮件系统都直接支持阅读回执,并且System.Net.Mail命名空间仅使用基本功能.如果您想阅读收据,则需要使用支持该收据的系统,例如Exchange with Outlook.
Read receipts are not directly supported by all email systems and the System.Net.Mail namespace only uses the base functionality. If you want read receipts you''ll need to use a system that supports it, like Exchange with Outlook.


这篇关于C#:如何添加已读通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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