A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Is there a 'Post send' event for an email



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old April 8th 08, 03:27 PM posted to microsoft.public.outlook.program_addins
Darshan
external usenet poster
 
Posts: 3
Default Is there a 'Post send' event for an email

Hi,

I am writing an Outlook Add-in (in Visual C++) through which I need to
identify all outgoing emails that are digitally signed (S/MIME).
Using the 'ItemSend' event does not help since it triggers my event handler
before digitally signing the email. The value of the PR_MESSAGE_CLASS in my
event handler is simply "IPM" but after the email is sent the value shows
"IPM.Note.SMIME.MultipartSigned".

Is there a way to trigger my event handler after all other operations on the
email have been completed? And also, I want to be able to cancle the sending
of the email through my event handler, similar to what ItemSend provides.

Thanks,
Darshan


Ads
  #2  
Old April 8th 08, 05:44 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Is there a 'Post send' event for an email

The change is made after the item is sent and no longer accessible to any
event handler in Outlook. You could trap the ItemAdd event on the Items
collection of the Sent Items folder but by then the item has already been
changed and depending on settings might not even go to Sent Items.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Darshan" darshan.tilak@gmail wrote in message
...
Hi,

I am writing an Outlook Add-in (in Visual C++) through which I need to
identify all outgoing emails that are digitally signed (S/MIME).
Using the 'ItemSend' event does not help since it triggers my event
handler before digitally signing the email. The value of the
PR_MESSAGE_CLASS in my event handler is simply "IPM" but after the email
is sent the value shows "IPM.Note.SMIME.MultipartSigned".

Is there a way to trigger my event handler after all other operations on
the email have been completed? And also, I want to be able to cancle the
sending of the email through my event handler, similar to what ItemSend
provides.

Thanks,
Darshan


  #3  
Old April 9th 08, 07:47 AM posted to microsoft.public.outlook.program_addins
Darshan
external usenet poster
 
Posts: 3
Default Is there a 'Post send' event for an email

Thanks for the info.

I also read something about the ISpoolerHook Interface in MAPI. Will that be
helpful to achieve my purpose? or even that will trigger after the email has
been sent?
Also, the description of the ISpoolerHook interface reaised a doubt in my
mind that will I, as an Add-in writer, be able to use/implement it?

Apart from that, I can see that when I send an email, the "Digitall Sign"
button (on the email window) is pressed. Is it possible to somehow track the
status (button_down/button_up) of this button inside the ItemSend event
handler? And would that be a reliable way to track if my email is going to
be digitally signed?

Please let me know if there is any way at all, using which I can track such
emails in Outlook?

Thanks,
Darshan


"Ken Slovak - [MVP - Outlook]" wrote in message
...
The change is made after the item is sent and no longer accessible to any
event handler in Outlook. You could trap the ItemAdd event on the Items
collection of the Sent Items folder but by then the item has already been
changed and depending on settings might not even go to Sent Items.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Darshan" darshan.tilak@gmail wrote in message
...
Hi,

I am writing an Outlook Add-in (in Visual C++) through which I need to
identify all outgoing emails that are digitally signed (S/MIME).
Using the 'ItemSend' event does not help since it triggers my event
handler before digitally signing the email. The value of the
PR_MESSAGE_CLASS in my event handler is simply "IPM" but after the email
is sent the value shows "IPM.Note.SMIME.MultipartSigned".

Is there a way to trigger my event handler after all other operations on
the email have been completed? And also, I want to be able to cancle the
sending of the email through my event handler, similar to what ItemSend
provides.

Thanks,
Darshan




  #4  
Old April 9th 08, 05:02 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Is there a 'Post send' event for an email

I have no idea about any MAPI hooks, but if you intend to program in
Extended MAPI you can only do it using C++ or Delphi. You'd have to ask
about the hook in microsoft.public.win32.programmer.messaging, a group for
MAPI.

You can get that button's ID and find it and check its state. I have no idea
what the ID would be however. If you use OutlookSpy you can use the
Inspector button in an open email and go to the CommandBars tab to find the
ID you'd need.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Darshan" darshan.tilak@gmail wrote in message
...
Thanks for the info.

I also read something about the ISpoolerHook Interface in MAPI. Will that
be helpful to achieve my purpose? or even that will trigger after the
email has been sent?
Also, the description of the ISpoolerHook interface reaised a doubt in my
mind that will I, as an Add-in writer, be able to use/implement it?

Apart from that, I can see that when I send an email, the "Digitall Sign"
button (on the email window) is pressed. Is it possible to somehow track
the status (button_down/button_up) of this button inside the ItemSend
event handler? And would that be a reliable way to track if my email is
going to be digitally signed?

Please let me know if there is any way at all, using which I can track
such emails in Outlook?

Thanks,
Darshan


  #5  
Old April 10th 08, 08:37 AM posted to microsoft.public.outlook.program_addins
Darshan
external usenet poster
 
Posts: 3
Default Is there a 'Post send' event for an email

Thanks Ken. It did work. I got the button, and its status, correctly, but
there is still a small problem.

I got the code working to fetch the button status, but it does not work if
Outlook is using Microsoft Word to compose its emails. If Word is being
used, then it is just not possible to get to the button programatically.
I found the same problem being encountered by other people on
Outlookcode.com. And there seems to be no solution for it. Please share with
me if you are aware of any solution for this.

Thanks anyway,
Darshan





"Ken Slovak - [MVP - Outlook]" wrote in message
...
I have no idea about any MAPI hooks, but if you intend to program in
Extended MAPI you can only do it using C++ or Delphi. You'd have to ask
about the hook in microsoft.public.win32.programmer.messaging, a group for
MAPI.

You can get that button's ID and find it and check its state. I have no
idea what the ID would be however. If you use OutlookSpy you can use the
Inspector button in an open email and go to the CommandBars tab to find
the ID you'd need.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Darshan" darshan.tilak@gmail wrote in message
...
Thanks for the info.

I also read something about the ISpoolerHook Interface in MAPI. Will that
be helpful to achieve my purpose? or even that will trigger after the
email has been sent?
Also, the description of the ISpoolerHook interface reaised a doubt in my
mind that will I, as an Add-in writer, be able to use/implement it?

Apart from that, I can see that when I send an email, the "Digitall Sign"
button (on the email window) is pressed. Is it possible to somehow track
the status (button_down/button_up) of this button inside the ItemSend
event handler? And would that be a reliable way to track if my email is
going to be digitally signed?

Please let me know if there is any way at all, using which I can track
such emails in Outlook?

Thanks,
Darshan




  #6  
Old April 10th 08, 03:57 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Is there a 'Post send' event for an email

WordMail is weird and wonderful and a royal PITA.

For use with WordMail I iterate the CommandBars collection looking for my
CommandBar and then re-instantiating the button object to be able to change
State. Your existing button object will fire Click() for example but even in
that event handler trying to change State will fire an exception. You must
re-instantiate the button from the object retrieved from Word.Document and
then you can change State.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Darshan" darshan.tilak@gmail wrote in message
...
Thanks Ken. It did work. I got the button, and its status, correctly, but
there is still a small problem.

I got the code working to fetch the button status, but it does not work if
Outlook is using Microsoft Word to compose its emails. If Word is being
used, then it is just not possible to get to the button programatically.
I found the same problem being encountered by other people on
Outlookcode.com. And there seems to be no solution for it. Please share
with me if you are aware of any solution for this.

Thanks anyway,
Darshan


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I send an automated email reminder for a calendar event ? IvanM Outlook - Calandaring 3 September 18th 06 11:39 PM
Send an email when a post item is posted to a particular folder [email protected] Outlook and VBA 1 September 18th 06 09:29 PM
how do i post an event for a recurring date of the month in outlo. kimf Outlook - Calandaring 2 September 1st 06 10:13 PM
Can I get Outlook 2003 to send an email triggered by an event Greg Wardlaw Outlook - Calandaring 1 September 1st 06 03:23 PM
How to bookmark or send copy of a particular post sheana Outlook Express 1 June 22nd 06 02:25 AM


All times are GMT +1. The time now is 08:45 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.