Outlook电子邮件转pdf安全提示 [英] Outlook email to pdf security prompt

查看:76
本文介绍了Outlook电子邮件转pdf安全提示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个任务,我需要创建一个将Outlook电子邮件转换为pdf的程序.

I have a task which i need to create a program that converts outlook email to pdf.

这是我的代码

Microsoft.Office.Interop.Outlook.Application app = new Microsoft.Office.Interop.Outlook.Application();
                NameSpace outlookNs = app.GetNamespace("MAPI");
                MAPIFolder rootFolder = outlookNs.Stores["Blah"].GetRootFolder();

                List<MailItem> mailItems = new List<MailItem>();
                Folders subFolders = rootFolder.Folders;
                foreach (Folder folder in subFolders)
                {
                    if (folder.Name == "Inbox")
                    {
                        Items items = folder.Items;
                        foreach (object item in items)
                        {
                            if (item is MailItem)
                            {
                                MailItem mailItem = item as MailItem;
                                string fileName = System.IO.Path.Combine(System.IO.Path.GetTempPath(), "New folder", mailItem.EntryID + mailItem.SenderName.Replace("/", "") + ".msg");
                                mailItem.SaveAs(fileName, Microsoft.Office.Interop.Outlook.OlSaveAsType.olMSG);
                            }
                        }
                    }

                }

该代码正在运行,但是前景包含成千上万的电子邮件.Outlook每隔10分钟会提示一条消息,类似于下面的屏幕截图

the code is working but the outlook contains thousands of email. The outlook prompt a message every 10 minutes similar to the screenshot below

是否有避免收到消息的方法?以编程方式或设置会做什么?

is there a way to avoid getting the message? Programatically or a setting will do?

推荐答案

请参见 http://www.outlookcode.com/article.aspx?id=52 以获得您的选项列表.

See http://www.outlookcode.com/article.aspx?id=52 for the list of your options.

从本质上讲,您可以确保计算机上的防病毒应用程序是最新的,也可以使用类似兑换以保存MSG文件.

Essentially, you can either make sure that the antivirus app on your machine is up to date or use a library like Redemption to save the MSG files.

这篇关于Outlook电子邮件转pdf安全提示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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