![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
Hi,
I would like to control when emails get sent from Outlook. For instance, when a user clicks send, some code needs to run. If the result of the code that runs is acceptable, the email gets sent, otherwise the message remains in the outbox. So I guess the event I need to tap into is the one that checks the outbox for messages to be sent and not the event that adds the item to the outbox items as items will need to remain in the outbox until the result of the code that runs is satisfactory. I am using redemption in my code so would prefer to use that if at all possible. Thanks in advance. Regards Greg J |
#2
|
|||
|
|||
![]()
Once a message is submitted to the transport if you mess with it in code it
either will abort the process or you'll get an error that the item has been moved and is unavailable. You really should cancel the send in the Send() event and move it to a holding folder. Then after processing it you can send it again, or you can do your processing in the Send event and cancel that if needed. -- 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 "Greg J" wrote in message ... Hi, I would like to control when emails get sent from Outlook. For instance, when a user clicks send, some code needs to run. If the result of the code that runs is acceptable, the email gets sent, otherwise the message remains in the outbox. So I guess the event I need to tap into is the one that checks the outbox for messages to be sent and not the event that adds the item to the outbox items as items will need to remain in the outbox until the result of the code that runs is satisfactory. I am using redemption in my code so would prefer to use that if at all possible. Thanks in advance. Regards Greg J |
#3
|
|||
|
|||
![]()
On Sep 22, 11:11*pm, "Ken Slovak - [MVP - Outlook]"
wrote: Once a message is submitted to the transport if you mess with it in code it either will abort the process or you'll get an error that the item has been moved and is unavailable. You really should cancel the send in the Send() event and move it to a holding folder. Then after processing it you can send it again, or you can do your processing in the Send event and cancel that if needed. -- 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 "Greg J" wrote in message ... Hi, I would like to control when emails get sent from Outlook. *For instance, when a user clicks send, some code needs to run. *If the result of the code that runs is acceptable, the email gets sent, otherwise the message remains in the outbox. *So I guess the event I need to tap into is the one that checks the outbox for messages to be sent and not the event that adds the item to the outbox items as items will need to remain in the outbox until the result of the code that runs is satisfactory. I am using redemption in my code so would prefer to use that if at all possible. Thanks in advance. Regards Greg J- Hide quoted text - - Show quoted text - Hi Ken, thanks for this, good advice |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Stop bracketting false area code when displaying phone no | MonocleMike | Outlook - Using Contacts | 8 | October 19th 08 04:34 AM |
Can I stop Outlook from deleting emails from server | Gordon D | Outlook - General Queries | 1 | April 4th 08 10:29 AM |
Stop Outlook forcing area code on mobile numbers | Jisher | Outlook - Using Contacts | 1 | August 22nd 07 02:26 PM |
How do i stop Strikethrough on deleted emails in Outlook | John | Outlook - General Queries | 2 | June 24th 06 08:48 PM |
how to stop duplicate emails in outlook 2003? | underbob | Outlook - Installation | 1 | June 1st 06 12:14 PM |