[英]How to track undelivered mail messages from outlook mail id
public void SendMAil()
{
MailMessage newMail = new MailMessage();
newMail.To.Add("xxxx@example.com");
newMail.From = new MailAddress(ConfigurationManager.AppSettings["FromMail"].ToString(), ConfigurationManager.AppSettings["FromMailDisplayName"].ToString());
newMail.Subject = "Hi";
newMail.Body = "this is the body";
SmtpClient SurveyMailClient = new SmtpClient(ConfigurationManager.AppSettings["SEMailServerIP"].ToString(), Convert.ToInt32(ConfigurationManager.AppSettings["SEMailServerPortNumber"]));
SurveyMailClient.DeliveryMethod = SmtpDeliveryMethod.Network;
SurveyMailClient.UseDefaultCredentials = true;
SurveyMailClient.Send(newMail);
}
Using the above code I am not able to track the undelivered mails in my outlook mail box(From Adress).If the mail is delivered successfully,the sent mail is not saving in Sent Items folder and if a mail is undelivered, mail delivery failure notice is not coming to my Inbox. 使用上面的代码,我无法在Outlook邮箱(来自Adress)中跟踪未送达的邮件。如果邮件已成功送达,则已发送的邮件不会保存在“已发送邮件”文件夹中;如果邮件未送达,则邮件发送失败通知没有收到我的收件箱。 So please help me how to track the undelivered mails from my application side using the above code.
因此,请帮助我如何使用上述代码从应用程序端跟踪未送达的邮件。
SMTP will only deliver the message, you have to manually "send" a copy into the "Sent Items" folder somehow. SMTP仅发送邮件,您必须以某种方式手动将副本“发送”到“已发送邮件”文件夹中。 My best bet would be using IMAP.
我最好的选择是使用IMAP。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.