I need to get the unread Outlook mails, using the filter of the Get Outlook Mail Messages activity, in order to only get the ones with attachments. This must be filtered using the activity, not filtering after I get the message, because the mails without attachments must not be marked as read, only the ones with attachments.
Right now, my filter string looks like this:
“[From]='”+Name+“’ AND [hasattachments]=‘Yes’”
But it says that the “hasattachments” property is unknown. How is called this property?
PD: In fact, the Outlook application is in Spanish, so the real string is:
“[De]='”+Name+“’ Y [tienedatosadjuntnos]=‘sí’”
So, if you know the property name in Spanish, it would be even better for me.
This is good info, cause it’s slow getting all emails then filtering afterward. But, what I’m wondering is if you have a table or list of senders, how well would it work to query the list into the filter parameter?
"@SQL= "+String.Join(" OR ",(From s In senders.AsEnumerable Select "urn:schemas:httpmail:sendername='"+s(0).ToString+"'").ToArray)
It should work. For fetching the emails based on Email Address, this works not the httpmail.
"@SQL="+Chr(34)+"http://schemas.microsoft.com/mapi/proptag/0x007D001E"+Chr(34)+" like '%Part of email%'"
"@SQL="+Chr(34)+"http://schemas.microsoft.com/mapi/proptag/0x007D001E"+Chr(34)+" ='Email Address'"
I tried your code (for fetching emails based on Email Adrress),
but the first one returned me some mails containing the specified Email Address (whether it is in To, or CC),
and the second one always returned me nothing.
I need to filter the emails only from a certain email address (Sender’s email address), do you have some suggestion on this?