I am trying to receive messages from an email address using Imaplib, so far I have been able to receive messages, however I am only interested in the original message, which means that if the message is "Re:" then I do not want the previous messages, I want only new, is it possible?
Here is what I get from python:
test # 10\r\n\r\nOn Thu, Dec 1, 2011 at 11:17 PM, paulo alvarado\r\n< commonzenpython@gmail.com >wrote:\r\n\r\n> test # 9\r\n>\r\n>\r\n> On Thu, Dec 1, 2011 at 11:15 PM, paulo alvarado < commonzenpython@gmail.com \r\n> > wrote:\r\n>\r\n>> test # 8\r\n>>\r\n>>\r\n>> On Thu, Dec 1, 2011 at 11:14 PM, paulo alvarado <\r\n>> commonzenpython@gmail.com > wrote:\r\n>>\r\n>>> test # 7\r\n>>>\r\n>>> On Thu, Dec 1, 2011 at 10:36 PM, paulo alvarado <\r\n>>> commonzenpython@gmail.com > wrote:\r\n>>>\r\n>>>> test # 6\r\n>>>>\r\n>>>>\r\n>>>> On Thu, Dec 1, 2011 at 10:36 PM, paulo alvarado <\r\n>>>> commonzenpython@gmail.com > wrote:\r\n>>>>\r\n>>>>> test # 5\r\n>>>>>\r\n>>>>>\r\n>>>>> On Thu, Dec 1, 2011 at 9:46 PM, paulo alvarado <\r\n>>>>> commonzenpython@gmail.com > wrote:\r\n>>>>>\r\n>>>>>> this is test # 4\r\n>>>>>>\r\n>>>>>>\r\n>>>>>>\r\n>>>>>> On Thu, Dec 1, 2011 at 7:13 PM, paulo alvarado <\r\n>>>>>> commonzenpython@gmail.com > wrote:\r\n>>>>>>\r\n>>>>>>> this is test # 1\r\n>>>>>>>\r\n>>>>>>\r\n>>>>>>\r\n>>>>>\r\n>>>>\r\n>>>\r\n>>\r\n>\r\n
as you can see test # 10 is a new post, others are previous answers I am using python2.7
EDIT
I have a ticket application, so basically, I want the user to be able to send tickets by email, so the userβs email address is the author, the subject is the header, and the message body is the description, I have everything working fine, except how to handle the answer, because at this moment, if the user answers by email, the ticket description will not only contain a new problem (or answer), but also will contain the previous ones, so I want to know if there is especially delete the previous answers and save only the new one, here is an image of my problem.
