This is sample code for deleting a message with airxmail imap client class.

var client:IMAP4Client = ...;
client.addFlag(message_uid,IMAP4Flag.DELETED);
client.expunge();

Related Posts

3 Responses to “airxmail: how to delete message with imap”

  • Szymon より:

    Hi, can You can give Me an example usage of flags, basically i what to get mails from gmail only headers so the mails on actual server stay flagged as unread. I can’t figure it out. 2nd thing is how I recognize if a email is read or unread.
    and 3rd thing i try to flag all mails as unread like so:
    // result for search method
    private function uidList(event:IMAP4ListEvent):void
    {
    var index:int = clientArray.lastIndexOf(event.target)
    //trace(“event.length” +event.length)
    for (var i:int = 0; i < event.length; i++)
    {
    var id:String = event.getValue(i);
    clientArray[index].message(id);

    //var flags:Array = [IMAP4Flag.RECENT];

    // TAG UID STORE 243 +FLAGS (\Seen \Answered)
    clientArray[index].addFlag(id, IMAP4Flag.);
    clientArray[index].expunge();

    }
    }

    is IMAP4Flag.RECENT the right flags for this i want to mark email as unread.

    thx for any help and great job with this lib

  • coltware より:

    Hi Szymon

    1st answer is..
    please use ‘header(id)’ method instead of message(id).
    The result class is same but you can’t get message body.

    2nd answer is…

    please get flags
    to get flag , please use ‘getter flags() of IMAP4MessageEvent’.

  • bio より:

    hi guys,
    i tried this code for deleting a msg on gmail but it did not work for me,
    by using trace, i got a msg say “imap4CommandBad”
    can someone help me plz?

    thanks,

Leave a Reply

Spam protection by WP Captcha-Free

RSS
Add to Google
2012年7月
« 3月   11月 »
1234567
891011121314
15161718192021
22232425262728
293031