Highlighted
Bogeremia Absent Member.
Absent Member.
1627 views

Could not get attachments.

Hello,

I try to obtain attachments for mail using getItemRequest but
Mail.attachments is null

Code:

getItemRequest reqEmail = new getItemRequest();
reqEmail.id = selectedEmail.id;
getItemResponse resp = _gw.getItemRequest(reqEmail);
if (resp.item is Mail)
{
Mail tstMail = resp.item as Mail;
if (tstMail.hasAttachment)
{
AttachmentItemInfo[] atts = tstMail.attachments;
}
}

selectedEmail.id is
"499D5B54.P4Domain.P4P0.100.171756D.1.9B.1@1:7.P4Domain.P4P0.100.0.1.0.1@16"

string
tstMail.hasAttachment is true
only problem is tstMail.attachments is nll.

GroupWise version is : GroupWise 7 with SP3


Thanks,
Bogdan
Labels (1)
0 Likes
2 Replies
Anonymous_User Absent Member.
Absent Member.

Re: Could not get attachments.

The attachments are not returned by default when
reading the user's message. You have to put "attachments"
in the view. You then get back information about the
attachments. You then have to use getAttachmentRequest
to actually get the attachment data.

Preston

>>> On Thursday, February 19, 2009 at 3:43 AM, Bogdan

Eremia<bogdan.eremia@unidec.ro> wrote:
> Hello,
>
> I try to obtain attachments for mail using getItemRequest but
> Mail.attachments is null
>
> Code:
>
> getItemRequest reqEmail = new getItemRequest();
> reqEmail.id = selectedEmail.id;
> getItemResponse resp = _gw.getItemRequest(reqEmail);
> if (resp.item is Mail)
> {
> Mail tstMail = resp.item as Mail;
> if (tstMail.hasAttachment)
> {
> AttachmentItemInfo[] atts = tstMail.attachments;
> }
> }
>
> selectedEmail.id is
>

"499D5B54.P4Domain.P4P0.100.171756D.1.9B.1@1:7.P4Domain.P4P0.100.0.1.0.1@16"

>
>
> string
> tstMail.hasAttachment is true
> only problem is tstMail.attachments is nll.
>
> GroupWise version is : GroupWise 7 with SP3
>
>
> Thanks,
> Bogdan

0 Likes
Bogeremia Absent Member.
Absent Member.

Re: Could not get attachments.


Thanks,
Bogdan


Preston Stephenson wrote:
> The attachments are not returned by default when
> reading the user's message. You have to put "attachments"
> in the view. You then get back information about the
> attachments. You then have to use getAttachmentRequest
> to actually get the attachment data.
>
> Preston
>
>>>> On Thursday, February 19, 2009 at 3:43 AM, Bogdan

> Eremia<bogdan.eremia@unidec.ro> wrote:
>> Hello,
>>
>> I try to obtain attachments for mail using getItemRequest but
>> Mail.attachments is null
>>
>> Code:
>>
>> getItemRequest reqEmail = new getItemRequest();
>> reqEmail.id = selectedEmail.id;
>> getItemResponse resp = _gw.getItemRequest(reqEmail);
>> if (resp.item is Mail)
>> {
>> Mail tstMail = resp.item as Mail;
>> if (tstMail.hasAttachment)
>> {
>> AttachmentItemInfo[] atts = tstMail.attachments;
>> }
>> }
>>
>> selectedEmail.id is
>>

> "499D5B54.P4Domain.P4P0.100.171756D.1.9B.1@1:7.P4Domain.P4P0.100.0.1.0.1@16"
>
>>
>> string
>> tstMail.hasAttachment is true
>> only problem is tstMail.attachments is nll.
>>
>> GroupWise version is : GroupWise 7 with SP3
>>
>>
>> Thanks,
>> Bogdan

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.