Last post Jun 20, 2014 02:30 PM by markfitzme
Jun 20, 2014 06:29 AM|bhupendertnwr|LINK
I am creating a web application where i can view all the gmail messages and when i click any of the messages it shoud show the body along with the replies. This is my code....
Pop3Client pop3Client = (Pop3Client)Session["Pop3Client"];
int messageNumber = int.Parse(Request.QueryString["MessageNumber"]);
Message message = pop3Client.GetMessage(messageNumber);
MessagePart messagePart = message.MessagePart.MessageParts;
lblFrom.Text = message.Headers.From.Address;
lblSubject.Text = message.Headers.Subject;
lblBody.Text = messagePart.BodyEncoding.GetString(messagePart.Body);
Jun 20, 2014 02:30 PM|markfitzme|LINK
You have to do the determination of what is a reply. There isn't anything really special in the email that says it's a reply. GMail generally just does this by associating identical subjects (paying attention to the RE: FWD: and other prefixes), and can
attempt to figure out an order based on timestamps. That's it though, you have to determine the order yourself just as gmail does. Keep in mind, these are all just standard emails, any magic is done by the gmail system itself when displaying the emails.