如何使用 php/linux 从 Lotus Domino 服务器获取 XML 格式的消息正文和附件?

发布于 2024-08-27 13:49:45 字数 742 浏览 9 评论 0原文

有人知道有关访问 Lotus Domino 服务器以通过 http(s) 请求从 php linux 服务器获取整个邮件内容的信息吗?

Andrei Kouvchinnikov 的 文章 很好地描述了如何在笔记邮件文件夹;例如,在登录期间获取会话 ID 后,可以通过调用以下命令来选择前 100 条消息:

https://your.server.domain/mail_db/mailbox.nsf/($Inbox)?ReadViewEntries&Start=1&Count=100

这非常有效。当我尝试获取消息内容时(0A1DA5EEB7B65277C12576F50055D811 是一个示例消息唯一 ID),问题就出现了:

https://your.server.domain/mail_db/mailbox.nsf/($Inbox)/0A1DA5EEB7B65277C12576F50055D811/?OpenDocument

IE 中的此类请求显示的框架集包含难以解析的数据,在 Opera 等不太常见的浏览器中,它会通知不支持的浏览器。理想情况下,如果可以通过在 url 中请求来获取笔记消息内容和所有附件,有人知道这是什么请求吗?链接到 Lotus Web 调用参考文献会更加有益。

Has anybody some information about accessing Lotus Domino server to fetch entire mail contents by http(s) requests from php linux server?

The article by Andrei Kouvchinnikov describes well how to fetch message list in notes mail folders; after obtaining session id during login one can for example select top 100 messages by calling:

https://your.server.domain/mail_db/mailbox.nsf/($Inbox)?ReadViewEntries&Start=1&Count=100

And this works perfectly. The problem arises when I am trying to get message contents (0A1DA5EEB7B65277C12576F50055D811 is an example message unique Id):

https://your.server.domain/mail_db/mailbox.nsf/($Inbox)/0A1DA5EEB7B65277C12576F50055D811/?OpenDocument

Such request in IE shows frameset with data hard to parse, in less common browsers like Opera it informs about unsupported browser. Ideally if it is possible to fetch notes message contents and all attachments by requesting it in the url, has anybody some information what request would it be? Link to Lotus web calls reference would be even more beneficial.

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

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

发布评论

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

评论(3

指尖上得阳光 2024-09-03 13:49:45

电子邮件消息不采用 XML 格式。它们是 MIME 或 RichText。因此,当您想要将它们作为 XML 时,您首先需要一些东西来将其转换。 ?ReadViewEntries XML 将为您提供一些基本数据(发件人、时间、主题),您可以使用它

https://your.server.domain/mail_db/mailbox.nsf/($Inbox)/0A1DA5EEB7B65277C12576F50055D811/Body?OpenField

来获取邮件正文的 HTML 表示形式。除此之外,我会在 Domino 服务器上部署一个小型代理,以您需要的格式呈现消息。对于 mime 消息,您可能需要原始 MIME 格式,对于 RichText,您可能需要它的 MIME 转换。

eMail messages don't come in XML format. They are either MIME or RichText. So when you want them as XML you need something to convert it for you first. The ?ReadViewEntries XML would give you already some essential data (from, time, subject) and you could use

https://your.server.domain/mail_db/mailbox.nsf/($Inbox)/0A1DA5EEB7B65277C12576F50055D811/Body?OpenField

to get the HTML representation of the Mail body. Other than that I would deploy a small agent to the Domino server that renders the messages in the format you need. For mime messages you probably want the original MIME format and for RichText the MIME conversion of it.

仅一夜美梦 2024-09-03 13:49:45

以下是 Domino URL 命令的列表:http://www.ibm。 com/developerworks/lotus/library/ls-Domino_URL_cheat_sheet/

您可以使用 ReadViewEntries 命令以 URL 形式获取收件箱数据。不幸的是,没有内置的用于读取 XML 文档的工具。

一个技巧是在 Notes 邮件数据库(或所有邮件数据库使用的模板)中创建邮件表单的副本,并将其设置为所有邮件字段的输出 XML。然后,您需要将表单设置为仅 Web 表单,并重命名或隐藏设置为显示在 Web 上的任何其他同名表单。然后 Notes 将使用您的表单来构建对 Web 客户端的响应。请注意,您还必须对模板进行一些更改,以禁止框架集用于 Web 客户端。不幸的是,如果您使用 Domino Web Access 系统通过 Web 访问电子邮件,这些更改可能会破坏 Domino Web Access 的使用。

Here is the list of Domino URL Commands: http://www.ibm.com/developerworks/lotus/library/ls-Domino_URL_cheat_sheet/

You can get the inbox data back as a URL using the ReadViewEntries command. Unfortunately there isn't a built in one for reading documents as XML.

One tip is to create a copy of the Mail form in the Notes mail database (or template used by all mail databases), and set it up to output XML for all the mail fields. You would then need to set the form as Web-only, and rename or hide any others with the same name that are set to appear on the Web. Then Notes would use your form to build responses to Web clients. Note, you'll also have to make some changes to the template to disable the framesets from being used for Web clients. Unfortunately, these changes could break the use of Domino Web Access, if you use that system for accessing email via the Web.

娇妻 2024-09-03 13:49:45

Lotus URL 规范中没有记录这个问题的明确答案,因此我将在这里分享。要获取包含标头和附件的整个消息,仅需要 Lotus 消息 UID,URL 为:

https://your.server.domain/mail_db/mailbox.nsf/($Inbox)/ca59f0649511e091c12576ce005af21d/?OpenDocument&Form=l_MailMessageHeader&PresetFields=FullMessage;1

其中 ca59f0649511e091c12576ce005af21d 是示例消息 UID。我希望有人会发现这些信息有用。

The definitive answer to this problem is undocumented in Lotus URL specification, so I will share it here. To fetch whole message with headers and attachments only Lotus message UID is required, the URL is:

https://your.server.domain/mail_db/mailbox.nsf/($Inbox)/ca59f0649511e091c12576ce005af21d/?OpenDocument&Form=l_MailMessageHeader&PresetFields=FullMessage;1

where ca59f0649511e091c12576ce005af21d is example message UID. I hope somebody will find this information useful.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文