从脚本发送包含附件(作为嵌入式对象)的邮件时,Domino服务器API getEmbeddedObjects();返回错误的结果(零). 尽管附件以EmbeddedOBject的形式发送,但getEmbeddedObjects();会返回ZERO. 邮件类型为NOT MIME.
The Domino server API getEmbeddedObjects(); returns the wrong result (zero) when a mail containing an attachment (as embedded object) is sent from the script. Though an attachment is sent as an EmbeddedOBject, getEmbeddedObjects(); returns ZERO. The mail type is NOT MIME.
这是一个Java应用程序.有没有解决此问题的方法?
This is a Java application. Is there is any workaround for this problem?
我从文件中取出尸体.如果正文是richtextitem,则我将调用getEmbeddedObjects(),尽管附件作为嵌入式对象存在,但该方法返回零.
I take the body from the document. If the body is of richtextitem, I call the getEmbeddedObjects() which returns zero though an attachment is present as embedded object.
推荐答案浏览文档中的所有项目是否可能存在附件,却无济于事.您需要做的就是使用@AttachmentNames公式(通过Session对象的Evaluate()方法,使用Document参数)获取附件名称的集合,如果该集合包含多个空字符串,请使用getAttachment ()方法获取对应的EmbeddedObject的句柄.
Looking through all of the items in a document for the possibility of an attachment is doing a lot of work for nothing. All you need to do is get the collection of attachment names using the @AttachmentNames formula (available through the evaluate() method of the Session object, using the Document argument), and if the collection contains more than an empty string, use the getAttachment() method of the document to get a handle to the corresponding EmbeddedObject.
getAttachment()可以获取文档的任何附件,无论该附件是与RichTextItem还是V2样式的附件(由Web UI或转换外部邮件创建的)相关联的.并且永远不要害怕在适当的时候使用公式语言-它可以使您的生活变得更加简单.
getAttachment() can grab any attachment to a document, whether it's associated with a RichTextItem or a V2-style attachment (as would be created by a web UI or when converting external mail). And never be afraid to use Formula Language when it's appropriate -- it can make your life a whole lot simpler.
更多推荐
调用getEmbeddedObjects(); (Domino服务器API)返回错误结果
发布评论