Hello,

I have read related part in python library and also searched this
list, however I still can not figure out where is wrong with my code.
so I post my question.

I am using the following code to process e-mails in a user account.

============================================================

mmailbox = '/var/spool/mail/' + user

                with open(mmailbox) as boxfile:
                        mbox = mailbox.UnixMailbox(boxfile,
self.msgfactory)
                        for mail in mbox:
                                if mail.get("Status") != "R" and
mail.get("Status") != "O":
                                        begin to process
                                        ......
                                         mail.add_flag("Status") = "R"

==========================================================

Notice that I have used "add_flag" to change its status. However, it
does not work as my code still processes those e-mails that have been
processed already.

Can anybody tell me where is wrong? Thanks so much.




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to