jmckay123 Absent Member.
Absent Member.
142 views

Accessing attachments in forwarded as attachment message

I'm trying to retrieve a message that I believe was "forwarded as attachment", where the original message contained an attachment. In the GroupWise client I can see the zip file attachment. When I try to get it using the SOAP API, for some reason it comes across as two separate messages. Neither of them has the zip file attachment. One of them does have an attachment, but it is only the HTML. Both of the messages have a property called "id" that is within the section "threading". I tried using this value in setItemRequest and getAttachmentRequest, but both attempts produce the error "bad parameter passed to a NCSP function", code 59905. Any suggestions on how I can retrieve all the data from this message?
Labels (1)
0 Likes
1 Reply
Anonymous_User Absent Member.
Absent Member.

Re: Accessing attachments in forwarded as attachment message

I'll try to fit the data in the response.
Embedded messages are special attachments.
The attachment id has a itemReference="1" attribute.
You have to use getItemRequest to get the embedded message attachment.
You can't use getAttachmentRequest.
Here is an example with most of the data removed:

<ns2:getItemsRequest>
<ns2:container>7.domain.PO1.100.0.1.0.1@16</ns2:container>
<ns2:view>default format attachments message peek recipients
recipientStatus</ns2:view>
<ns2:items>

<item>5CF508DD.domain.PO1.100.1776172.1.16220.1@1:7.domain.PO1.100.0.1.0.1@1
6</item>
</ns2:items>
</ns2:getItemsRequest>

<gwm:getItemsResponse>
<gwm:items>
<gwt:item xsi:type="gwt:Mail">

<gwt:id>5CF508DD.domain.PO1.100.1776172.1.16220.1@1:7.domain.PO1.100.0.1.0.1
@16</gwt:id>
<gwt:sid>90656</gwt:sid>
<gwt:subject>Fwd: one</gwt:subject>
<gwt:message>
<gwt:part contentType="text/plain" length="8">dHdvCgo=</gwt:part>
</gwt:message>
<gwt:attachments>
<gwt:attachment>
<gwt:id
itemReference="1">5CF508DD.domain.PO1.200.2000011.1.D0C.1@49:5CF508DD.domain
..PO1.100.1776172.1.16220.1@1:7.domain.PO1.100.0.1.0.1@16</gwt:id>
<gwt:name>one</gwt:name>
<gwt:contentType>Mail</gwt:contentType>
</gwt:attachment>
</gwt:attachments>
<gwt:threading>

<gwt:id>5CF4ECA9.domain.PO1.200.20000C2.1.21BDB.1:5CF4ECBD.domain.PO1.200.20
00011.1.D0E.1</gwt:id>
<gwt:parent>5CF4ECA9.domain.PO1.200.20000C2.1.21BDB.1</gwt:parent>
</gwt:threading>
</gwt:item>
</gwm:items>
</gwm:getItemsResponse>

<ns2:getItemRequest>

<ns2:id>5CF508DD.domain.PO1.200.2000011.1.D0C.1@49:5CF508DD.domain.PO1.100.1
776172.1.16220.1@1:7.domain.PO1.100.0.1.0.1@16</ns2:id>
<ns2:view>default attachments peek</ns2:view>
</ns2:getItemRequest>

<gwm:getItemResponse>
<gwm:item xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="gwt:Mail">

<gwt:id>5CF508DD.domain.PO1.200.20000C2.1.21BDE.1@1:5CF508DD.domain.PO1.200.
2000011.1.D0C.1@49:5CF508DD.domain.PO1.100.1776172.1.16220.1@1:7.domain.PO1.
100.0.1.0.1@16</gwt:id>
<gwt:sid>138206</gwt:sid>
<gwt:subject>one</gwt:subject>
<gwt:message>
<gwt:part contentType="text/plain" length="8">b25lCg==</gwt:part>
</gwt:message>
<gwt:attachments>
<gwt:attachment>

<gwt:id>5CF508C9.domain.PO1.200.20000C2.1.21BD9.1@45:5CF508DD.domain.PO1.200
..20000C2.1.21BDE.1@1:5CF508DD.domain.PO1.200.2000011.1.D0C.1@49:5CF508DD.dom
ain.PO1.100.1776172.1.16220.1@1:7.domain.PO1.100.0.1.0.1@16</gwt:id>
<gwt:name>TEXT.htm</gwt:name>
<gwt:contentType>TEXT/HTML</gwt:contentType>
<gwt:size>447</gwt:size>
<gwt:hidden>1</gwt:hidden>
</gwt:attachment>
</gwt:attachments>
</gwm:item>
</gwm:getItemResponse>

Let me know if you still have problems.
Preston
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.