简体   繁体   English

如何从Outlook邮件ID跟踪未送达的邮件

[英]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.

相关问题 从 UIPATH 中的特定邮件组获取 Outlook 邮件消息 - Get Outlook Mail Messages from specific mail group in UIPATH 如何从内存中制作Outlook邮件附件? - How to make outlook mail attachment from memory? 如何从Outlook的子文件夹中提取邮件主题? - How to extract mail subject from subfolder of outlook? 如何在Outlook服务器上跟踪消息 - how to track messages on an outlook server 如何从.NET监视Outlook邮件接收事件 - How to monitor Outlook mail received event from .NET 如何以编程方式将邮件项从目录文件夹移动到MS Outlook? - How to programatically move Mail Items to MS Outlook from a directory folder? 如何从用户的Outlook邮箱发送邮件 - How to send mail from user's Outlook mailbox 如何在Outlook窗口中为收件箱中的邮件创建按钮(双击邮件)? - How to create a button in a outlook window for a mail from a inbox (double click on mail)? 如何使用c#从具有MultiAccount的Outlook 2010中的“撰写邮件”窗口中的(发件人)邮件地址获取信息? - how to get from(sender) mail address in Compose mail window in outlook 2010 having MultiAccount using c#? 如何开始创建允许将邮件拖放到任务窗格的Outlook外接程序 - How to begin creating an outlook addin that allows drag and drop of mail messages to a task pane
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM