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.
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With