I need to recognize if email message is an response for message sent by my application, to put it into same email thread (something like gmail does). How can I mark an email or what data let me to recognize if it's an answer for one of previous messages in a thread?
I'm connecting through IMAP protocol, but I can easily switch to pop3 if it will be easier...