简体   繁体   中英

C# get all mailboxes using admin account for IMAP, POP or Exchange server

I want to access the Mail Boxes for all the users using Admin account of my mail server in a scheduler service in windows server.

Mail server can be configured with IMAP, POP3 or it can be exchange server. So is there any way to do it as i need to process all the emails and want to perform certain actions.

I am not able to find anything in case of POP3 and IMAP. please let me know if there is a common way for all the settings or let me know how i can do it in each case pragmatically.

If you use MailKit , you can connect via POP3 or IMAP (your choice) and process all of the mails you want.

Keep in mind that if you want to process messages in any folder other than the INBOX, you'll need to use IMAP because POP3 only allows you to download messages in the INBOX and has no support for other folders.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM