0 votes

Hello,

I have license of Mail.dll. I want to set following functionality. Let me know if it is possible

Case-1- I want to set functionality in which mails of specific email sender should move to junk folder.
Case-2- I want to set functionality in which mails from specific domain should move to junk folder. ex. if mail come from "mycompany.com" (abc@mycompany.com, xyz@mycompany.com) should be move to junk folder.
Case-3- Mails of specific email sender should delete automatically(also don't move to Trash folder).
Case-4- Mails from specific domain should be deleted automatically(also don't move to Trash folder).

Let me know if it possible.

by (3.0k points)
edited by

1 Answer

0 votes

Mail.dll is an IMAP client library. It can not be used to configure your server.

It can however search for specific emails:
https://www.limilabs.com/blog/how-to-search-imap-in-net

Move them:
https://www.limilabs.com/blog/move-emails-to-different-folder-with-imap

Deleted them:
https://www.limilabs.com/blog/delete-email-messages-with-imap

by (297k points)
Hello,
What I understand from your comment is
Case-1: I must manually move the emails to Junk folder.
Case-2: I must identify the domain first and move manually to Junk folder
Case-3: I must manually delete the emails
Case-4: I must identify the domain first and delete it.

If I am not wrong in all above case, all functionality I need to set manually.

Can I set following functionality?
Case-5 Set abc@mycompany.com as sensitive sender. So, next time when I got mail from abc@mycompany.com, it automatically move to junk folder or spam folder.
Is it possible? if so, can you please suggest me how? If it is possible, I don't need to check manually everytime when mail arrive. This will greatly helpful if it is possible.

Thank you
You can not configure how your IMAP server behaves using any IMAP client library. IMAP is for managing emails on the server, not for configuring server to perform automatic tasks. There is simply no such feature in IMAP protocol. However you can search, list, move, copy, delete, mark as seen/unseen, flag, delete messages, create and mange folders and finally download emails.
Hello,
I am working on mail application. I have referred Rules and Junk configuration functionality in many mail application available in market.

So, there should be some way to achieve it. Can you please suggest me way how can I configure it if you have idea?
As I said, all those work locally on the client, then instruct the server to do something -or- those work locally only.

There is no way to instruct server to perform automatic tasks using IMAP protocol -nor- to create/configure server-side filters using IMAP.

You can of course instruct server to perform stuff like: move this message to junk folder.
Hello,

Limilabs, "You can of course instruct server to perform stuff like: move this message to junk folder"
Can you please suggest how can I achieve this?
Do you mean by this? https://www.limilabs.com/blog/move-emails-to-different-folder-with-imap
If so, in this case I can perform once I get the mail. It is overhead to performance of the system if I check for every mail and move it.

Let me know if I misunderstand.
You are asking the same question again and again. The answer is the same:
IMAP is for managing emails on the server, not for configuring server to perform automatic tasks. There is simply no such feature in IMAP protocol.  

I showed you how to move emails in the first answer. There is no other way of doing it. To move email to different folder you must have message UID and folder name. You don't need to download entire mesage. In many cases using Search and GetMessageInfoByUID gives you enough information to perform tasks you need.
Thank you for clarification.
...