Mail add-in sent event - outlook

Is there a way to perform one final action right before an email is sent. I am making a Mail Add-in and I want to notify my application when the user sends the email. I am looking for a final state that let's my application know the user is finished composing their email.

For the COM addins, you can use Application.ItemSend event. For the web based addins, there is no such callback.

Related

Outlook web add in before send and before delete events

I need to send data (body, location and etc.) from the appointment to my server after the user clicks on Send and Delete button.
I find solution for "Send" event in documentation.
Are there any other hooks for Send event and can I catch Delete event in Outlook web add in?
Thanks.
The only hook for the Send event is the On-Send feature you linked above. Currently, we don't have a hook for the Delete event. We track Outlook Add-in feature requests on our user-voice page. Please add a request there. Feature requests on user-voice are considered when we go through our planning process.

A MailItem saved in the ItemSend Event is saved as draft

I'm developing an Outlook add-in that allows the user to save an email to the filesystem just after it's been sent.
To achieve this, I intercept the Application.ItemSend event, and inside my handler I call MailItem.SaveAs(...). It works, basically.
The problem I'm facing is that, when I open the file saved, the email is in draft state. I mean, the recipients, subject and message body can be modified, and the email can be resent. I want the email to be in "sent" state, i.e. not modifiable.
It looks like Outlook API does not provide any event dispatched after the email is sent. Only before, and this is my pain.
Do you have any idea to perform this?
Thanks a lot for your help!
Nico
the earliest you can save the message in the sent state and with the sender properties populated is when Items.ItemAdd event fires on the Sent Items folder.

How to listen an MailItem event in Mail Add-in?

I want to detect an event in Mail Add-in. In Outlook, thick/desktop version, we can detect the mail event, such as MailItem.Send and MailItem.AttachmentAdd.
Is it possible to listen to these events in Outlook online?
Unfortunately there are almost no events of any kind in the Mailbox API, other than asynchronous callbacks that are only fired when you initiate them. There is nothing that I'm aware of that can be used to detect item send or attachment modification events.
The closest option is to use the Outlook Notifications REST API (https://msdn.microsoft.com/office/office365/APi/notify-rest-operations), but these are more suitable to monitoring item/folder level changes. Perhaps you can hook into a notification for the Sent Items folder to approximate a MailItem.Send operation, or watch changes to a draft item to detect a newly added attachment.
nop. you can't do this. Office Apps can't interact with buttons or actions on the client apps such as: Outlook.

MS Outlook - Send messages located in Outbox

In my MS Outlook 2007, I have multiple (several hundred) messages in the Outbox and they are marked in bold, but NOT marked in italics. Hence, I cannot send them unless I open each message individually and hit the Send button :(
Is it possible to use a VBScript to send these messages?
I have no knowledge in scripting whatsoever.
Thank you for your help!
I have multiple (several hundred) messages in the Outbox
Did you submit these messages manually and they are stuck in the Outboox?
Anyway, you can automate Outlook from VBA. See Getting Started with VBA in Outlook 2010 to get started quickly.
Pay special attention to the ItemSend event of the Application class. It is fired whenever an Microsoft Outlook item is sent, either by the user through an Inspector (before the inspector is closed, but after the user clicks the Send button) or when the Send method for an Outlook item, such as MailItem, is used in a program. You can display a custom dialog for confirming. The Cancel parameter passed to the event handler allows to cancel the action. If the event procedure sets this argument to true, the send action is not completed.

Delay emails sent and received through IMAP

I want to put emails the user receives in a sort of "review status" in my app and let users choose manually if they want them to be let through.
For this I need to filter network traffic to withhold emails receivef with the IMAP protocol from Outlook and send them some time afterward. And to the same for emails being sent.
Would this be possible to do on Outlook on Windows 7/8? Or would I be unable to make Outlook receive the mailing after I filter it out?
The Outlook object model doesn't provide anything for foltering emails.
Instead, you may consider handling the new email programmatically in the code handling the NewMailEx event which is fired when a new item is received in the Inbox. For example, you may develop a VBA macro for doing any customizations in Outlook programmatically. See Getting Started with VBA in Outlook 2010 for more information.

Resources