How do you delete mail in IMAP?
Miguel Garcia
miguel.garcia at roig.com
Tue Apr 12 06:50:06 UTC 2022
Hi Das,
First set the "deleted" flag to kTrue using kOW3imapActionSetMessageFlags.
Example :
Do RowFlags.$addcols('answered',kInteger,k32bitint,)
Do RowFlags.$addcols('deleted',kInteger,k32bitint,)
Do RowFlags.$addcols('draft',kInteger,k32bitint,)
Do RowFlags.$addcols('flagged',kInteger,k32bitint,)
Do RowFlags.$addcols('seen',kInteger,k32bitint,)
Do RowFlags.$assigncols(kUnknown,kTrue,kUnknown,kUnknown,kUnknown)
Do
$cinst.$start(kOW3imapActionSetMessageFlags,pMailboxName,pUID,RowFlags)
Returns lOk
Then to delete completely de message execute the EXPUGNE imap command.
Example :
Calculate lCmd as $cinst.$chartoutf7(nfd(trim('EXPUNGE')))
Do $cinst.$start(kOW3imapActionExecute,pMailboxName,lCmd)
Returns lOk
$cinst is an IMAPClientWorker object and pMailboxName is the folder of
the message.
Best regards.
El 11/4/22 a las 20:52, Das Goravani escribió:
> Talking 10.2 here
>
> In IMAP I have noticed actions for things like listing mailboxes, listing messages and so on…
>
> But there’s no action for deleting a message completely
>
> How do you delete a message completely in the IMAP world within Omnis
>
> The one mention of "get’s rid of message" was in reference to appending the same message again to a list.. it said messages with duplicate ID’s disappear by the IMAP engine, so I was thinking one way to get rid of a message is to append itself to the same list and then both copies will go away?
>
> Then there’s the Action for commands and there is some type of DELETE command within IMAP since I was able to find it’s error codes
>
> I guess I have to make a custom command binary and execute that having the delete command within it
>
> Anyone have that or know the way to delete?
> _____________________________________________________________
> Manage your list subscriptions athttps://lists.omnis-dev.com
> Start a new message ->mailto:omnisdev-en at lists.omnis-dev.com
--
*Miguel Garcia Segui
DPTO Informatica
971 65 71 73 Ext. 2044*
More information about the omnisdev-en
mailing list