如何在asp.net中获取已发送邮件的状态c# [英] How to get status of sent mail in asp.net c#

查看:101
本文介绍了如何在asp.net中获取已发送邮件的状态c#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨!!!

告诉我在asp.net c#中获取已发送邮件状态的步骤。请给我解决这个问题的方法。我附上

以下代码了解更多详情。







提示:如果我发送邮件到一个电子邮件ID,我想获得发送电子邮件的状态

解决方案

请参阅以下链接



http://forums.asp.net/t/1673599.aspx/1 [ ^ ]


如果您的代码或SMTP服务器上没有收到任何例外,您可以认为它已经交付。这是电子邮件的问题,无法保证交付。


 SmtpClient SmtpServer =  new  SmtpClient(); 
SmtpServer.Credentials = new Net.NetworkCredential( xyz@gmail.com password);
SmtpServer.Port = 587 ;
SmtpServer.Host = smtp.gmail.com;
SmtpServer.EnableSsl = true ;

mail = new MailMessage();
mail.DeliveryNotificationOptions = DeliveryNotificationOptions.OnFailure;
mail.ReplyTo = new MailAddress(TextBox1.Text);
SmtpServer.Send(mail);





这是用于 SMTP Delievry Response


Hi!!!
Tell me the steps to get the status of sent mail in asp.net c#. Kindly give me the solution for this problem. I attached
the code below for further details.



Hint: If i sent mail to one email id, i want to get the status of sent email

解决方案

Refer below link

http://forums.asp.net/t/1673599.aspx/1[^]


If you don''t receive any exceptions in your code or on your SMTP server, you can assume that it has been delivered. That is a problem with e-mail, there is no way to guaranteeing delivery.


SmtpClient SmtpServer = new SmtpClient();
SmtpServer.Credentials = new Net.NetworkCredential("xyz@gmail.com", "password");
SmtpServer.Port = 587;
SmtpServer.Host = "smtp.gmail.com";
SmtpServer.EnableSsl = true;

mail = new MailMessage();
mail.DeliveryNotificationOptions = DeliveryNotificationOptions.OnFailure;
mail.ReplyTo = new MailAddress(TextBox1.Text);
SmtpServer.Send(mail);



This is for SMTP Delievry Response


这篇关于如何在asp.net中获取已发送邮件的状态c#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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