We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Getting unread email does not work, tested with GMail account

have the following code, it gives me 0 messages

ImapClient oClient = new ImapClient();
oClient.Host = oRow[“SMTPSERVER”].ToString().Trim();
oClient.Username = oRow[“USERNAME”].ToString().Trim();
oClient.Password = oRow[“USERPASS”].ToString().Trim();
oClient.Port = Convert.ToInt32(oRow[“SMTPPORT”].ToString().Trim());
bool bSSLEnabled = Convert.ToBoolean(oRow[“ENABLED”].ToString().Trim());
if (bSSLEnabled)
{

					oClient.SecurityOptions = SecurityOptions.Auto;
				}                   

				oClient.SelectFolder(ImapFolderInfo.InBox);

				ImapQueryBuilder builder = new ImapQueryBuilder();

				builder.HasFlags(ImapMessageFlags.Recent);

				MailQuery oQuery = builder.GetQuery();

				ImapMessageInfoCollection messageInfoCol = oClient.ListMessages(oQuery);

@dwijay_cdevworkflow_com,

We are investigating this at our end and will soon update you with our findings. We appreciate your patience in this regard.

Got the latest components also, we are using this library on our commercial product, we need this functionality working soon since our customers are expecting things to work. thanks

@dwijay_cdevworkflow_com,

We are already investigating this at our end and will soon share our findings with you. We appreciate your little more patience in this regard.

@dwijay_cdevworkflow_com,

Please use the:

builder.HasNoFlags(ImapMessageFlags.IsRead);

to get unread email items from the Mailbox and let us know your feedback.