Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Outlook IMAP completed email and attachments download event

My Outlook add-in (C++) processes received email attachments as they are received, which works fine for POP3 accounts, but doesn't work with IMAP accounts because I only receive the email header with the events I use (I tried the events NewMailEx, and ItemLoad events for the interface _Application I also tried the events Read and BeforeAttachmentRead for the interface _MailItem). I am looking for the appropriate event that is fired just after an IMAP email is completely downloaded including attachments, but before the attachment is opened by the user. I don't want to force the download of attachments, I just want to be able to know when a new email with attachments is accessible, which will probably happen when the user reads it.

Note: It's important that I am able to access the attachment before the user opens it.

Any help would be greatly appreciated.

like image 470
rad Avatar asked Feb 13 '12 18:02

rad


People also ask

Does Outlook download IMAP emails?

You need to configure Outlook to download the complete email, not just the header. To make the change, you must open the Send/Receive Settings dialog box in Outlook, select your IMAP account, and then select “Download complete item including attachments” in the Folder Options section.

Is Outlook a POP or IMAP?

Outlook.com (Outlook.com) provides IMAP access to your Outlook.com (Outlook.com) account, so you can connect to your email from mobile devices and desktop email clients.

What is IMAP account?

IMAP, which is short for Internet Message Access Protocol, is an email protocol that keeps your email in sync across multiple devices, and lets you access your messages from any computer or mobile device. It's a lot more flexible than POP (Post Office Protocol), which essentially ties you to a single device.


1 Answers

I've worked at the protocol level using IMAP and Outlook. Most IMAP clients, Outlook included, will only fetch the headers of new mail messages from the IMAP server to populate the email list for presentation to the user. They won't fetch the entire body of the message until the user clicks to open it. POP3 clients generally do download the entire message when it arrives. If your plugin can work as the user opens it then you might be okay (I'm not that familiar with the plugin API to know this). If you need to do something with the message as it arrives in IMAP, you might have to re-think your architecture and/or configuration.

like image 55
mark Avatar answered Oct 11 '22 09:10

mark