C# - 获得共享邮箱发送项目文件夹对象

发布于 2025-02-12 23:28:23 字数 287 浏览 1 评论 0原文

我正在尝试获取共享邮箱从我的Outlook帐户发送项目文件夹。我当前的Outlook帐户有两个共享邮箱。我需要获取那些共享的邮箱已发送项目文件夹。

以下API调用仅检索本机发送的项目文件夹但没有共享的邮箱:

(Interop.Folder)m_outlook.Application.Session.GetDefaultFolder(Interop.OlDefaultFolders.olFolderSentMail);

有人可以告诉我一种如何获取共享邮箱已发送项目文件夹的方法吗?

I am trying to fetch the Shared Mailboxes sent items folder from my outlook account. My current outlook account has two shared mailboxes. I need to fetch those shared mailbox sent items folder.

The below API call only retrieves the native sent items folder but not shared mailbox:

(Interop.Folder)m_outlook.Application.Session.GetDefaultFolder(Interop.OlDefaultFolders.olFolderSentMail);

Can someone please tell me a way how to fetch the shared mailboxes sent items folder?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

趁年轻赶紧闹 2025-02-19 23:28:23

使用“ nofollow noreferrer”> namespace.getSharedDefaultDefaultFolder 返回一个代表指定用户指定的默认文件夹的文件夹对象。此方法用于委派方案,其中一个用户已将其一个或多个默认文件夹授予另一个用户访问。

            Outlook.Recipient recip =
                Application.Session.CreateRecipient("Eugene Astafiev");
            if (recip.Resolve())
            {
                try
                {
                    Outlook.Folder folder =
                       Application.Session.GetSharedDefaultFolder(
                          recip, Outlook.OlDefaultFolders.olFolderSentMail)
                       as Outlook.Folder;
                    folder.Display();
                }
                catch
                {
                    MessageBox.Show("Could not open the manager's sent items folder.",
                       "GetSharedDefaultFolder Example",
                       MessageBoxButtons.OK,
                       MessageBoxIcon.Error);
                }
            }

Use the NameSpace.GetSharedDefaultFolder method instead which returns a Folder object that represents the specified default folder for the specified user. This method is used in a delegation scenario, where one user has delegated access to another user for one or more of their default folders.

            Outlook.Recipient recip =
                Application.Session.CreateRecipient("Eugene Astafiev");
            if (recip.Resolve())
            {
                try
                {
                    Outlook.Folder folder =
                       Application.Session.GetSharedDefaultFolder(
                          recip, Outlook.OlDefaultFolders.olFolderSentMail)
                       as Outlook.Folder;
                    folder.Display();
                }
                catch
                {
                    MessageBox.Show("Could not open the manager's sent items folder.",
                       "GetSharedDefaultFolder Example",
                       MessageBoxButtons.OK,
                       MessageBoxIcon.Error);
                }
            }
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文