linkedinfacebooktwittermenuarrow-up

GemBox Support Forum

Search Emails using Subject keyword and Argument having space

Hey,
I am evaluating your product and performing some methods of IMAPClient.

I am not able to get the result while searching the Emails with Subjject.
I tried the following code.

For Each uid As String In objImapClient.SearchMessageUids("SUBJECT WorkSpace Required")
	Dim unreadEmail As MailMessage = objImapClient.GetMessage(uid)
Next

I tried many times and then figure out that after Keyword “SUBJECT” you have to add the keyword that should not have space (“SUBJECT WorkSpaceRequired”) else it throws the exception
“Error in IMAP command UID SEARCH: Unknown argument Required (0.001 + 0.000 secs).”

Hi Harsh,

Try quoting the subject like this:

objImapClient.SearchMessageUids("SUBJECT ""WorkSpace Required""")

Does this solve your issue?

Regards,
Mario

Hey Mario,

Thanks for your quick response.
It solved my issue.

Regards,
Harsh