Quantcast
Channel: Zimbra Forums
Viewing all articles
Browse latest Browse all 1218

Developers • Re: Zimbra REST API - Import Message as Draft

$
0
0
It was painful but We could import message as Draft !

The tricks is after Simulating the "Edit as New" we need to parse XML returned by API and add tag <attach> to avoid losing attachments.
To be precise this is the list of things we need to customize before calling SaveAsDraft:

- remove id in <m> tag to avoid IMMUTABLE Exception
- For each tag <mp> containing cd="Attachment" of "inline"
=> Add a following Nodes <attach><mp mid="<The message id we get previously>" part="<Value of previous mp>"/><attach>

And to finalise the process, we need to delete the imported message (by calling MsgActionRequest)

It's a lot of action (5 API called to only create draft), BUT IT WORKS !

Thanks all for you help

Statistics: Posted by tglenard — Thu Dec 21, 2023 4:15 pm



Viewing all articles
Browse latest Browse all 1218

Trending Articles