Hi Team,
I have implemented evolution version for the pop3 only , but when i implement it in filter mail pattern , it gives me result but email content is missing ( comes under non-public method which is not accessible directly ) , so with full version implementation is am i able to access body content of mail which i filtered via subject line and date .
Regards,
Arihant Jain
Hi team ,
Thanks for the reply to my mail .
but it’s seem not gave me the full answer , my query is can i retrieve data from body when i am doing filtration on subject ,coz i didn’t get .
also please find the below code for the same .
MailQueryBuilder builder = new MailQueryBuilder();
builder.Subject.Contains(“20 Burning Questions for ASP.NET Developers in 2015”);
MailQuery query = builder.GetQuery();
Pop3MessageInfoCollection messages = client.ListMessages(query);
Console.WriteLine(“Pop3: " + messages.Count + " message(s) found.”);
with the help of above code i didn’t get mail body directly because its non accessible via object .
kindly provide some demo code for fetch body with filtering .
Provide code as soon as possible , b’coz after POC of this same we need to purchase full license for implement in this our org.
Hi,
Your code actually lists the messages summary information from the server that doesn’t contain the complete details of message such as message body. Please use the Pop3Client.FetchMessage to further fetch the message from the server using it’s unique id or sequence number. The following code sample shows how to achieve this. Please try it at your end and let us know if you need any further assistance in this regard.
Sample Code:
MailQueryBuilder builder = new MailQueryBuilder();
builder.Subject.Contains(“20 Burning Questions for ASP.NET Developers in 2015”);
MailQuery query = builder.GetQuery();
Pop3MessageInfoCollection messages = client.ListMessages(query);
Console.WriteLine(“Pop3: " + messages.Count + " message(s) found.”);
//Now you need to fetch the messages and get its body
foreach (Pop3MessageInfo msgInfo in messages)
{
MailMessage eml = client.FetchMessage(msgInfo.UniqueId);
Console.WriteLine(eml.Body);
}