0 votes

Just like outlook which user can define rules for emails, I assume in the case of mail.dll we need to create our own rule based engine and then under it using mail.dll?

by

1 Answer

0 votes

Yes, you'll need to create your own solution for that. There is no build-in rule engine in Mail.dll.

Mail.dll gives you easy, strongly typed, access common email fields, to every email part, attachment and header of the email message.

Most likely your rule engine should work on IMail instance. It represents email message downloaded from IMAP or POP3 server, it includes all attachments.

However, if you only need to move emails to different folders on IMAP server, according to some rules, you may want to use Imap.GetMessageInfoByUID method. It returns message envelope information (Subject, Date, From and To recipients) and message structure (Attachment count, attachment names and sizes). You can then use UIDs to move emails without downloading entire message locally.
You can find more info here: Get email information from IMAP

by (297k points)
...