Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Add-ins for Outlook (http://www.outlookbanter.com/add-ins-outlook/)
-   -   mailitem Send issue (http://www.outlookbanter.com/add-ins-outlook/94352-mailitem-send-issue.html)

amh September 1st 09 08:19 PM

mailitem Send issue
 
I have a custom addin that runs code when the mailitem.send event is fired, however in certain cases the mailitem.send is not fired and it skips to the application.itemsend event and i don't know why.

Here's the scenario. Compose a new email click "send", mailitem.send event is fired but due to custom code it appropriately cancels the event. I then click "send" again, the mailitem.send event is skipped and the application.itemsend event fires. I don't want to have any custom code behind the application.item send. I can run the same scenario on different machines and only find the problem with one configuration but I can't figure out what it could be. This problems occurs on specific Windows XP/Outlook 2003 machines.

Any help would be apprecatied.

Ken Slovak - [MVP - Outlook] September 2nd 09 02:11 PM

mailitem Send issue
 
It sounds to me like you're releasing something after that first Send()
event so your event handler is going out of scope or being garbage
collected. Check for that in your code.

--
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


"amh" wrote in message
...

I have a custom addin that runs code when the mailitem.send event is
fired, however in certain cases the mailitem.send is not fired and it
skips to the application.itemsend event and i don't know why.

Here's the scenario. Compose a new email click "send", mailitem.send
event is fired but due to custom code it appropriately cancels the
event. I then click "send" again, the mailitem.send event is skipped
and the application.itemsend event fires. I don't want to have any
custom code behind the application.item send. I can run the same
scenario on different machines and only find the problem with one
configuration but I can't figure out what it could be. This problems
occurs on specific Windows XP/Outlook 2003 machines.

Any help would be apprecatied.




--
amh



amh September 15th 09 02:33 PM

Ken,

If it was code I should have the same problem across all the machines. Again it's just specific to one XP/Outlook 2003 machine. If I create a new email, enter "abc" in the to: field then click send, the outlook send event runs first before our custom code and notifies me I have an invalid recipient, I fix it and then click send again and my custom code never fires. So it seems whether it's Outlook canceling the send or our custom code canceling the send, the next time the send button is clicked our code is never called again. Let me know if you have any additional insight. Just to reiterate it's specific to a machine. I have 5 machines running xp/Outlook 2003 and 5 running vista/Outlook 2007 and the issue only occurs on one of the xp machines.


Quote:

Originally Posted by Ken Slovak - [MVP - Outlook] (Post 321285)
It sounds to me like you're releasing something after that first Send()
event so your event handler is going out of scope or being garbage
collected. Check for that in your code.

--
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


"amh" wrote in message
...

I have a custom addin that runs code when the mailitem.send event is
fired, however in certain cases the mailitem.send is not fired and it
skips to the application.itemsend event and i don't know why.

Here's the scenario. Compose a new email click "send", mailitem.send
event is fired but due to custom code it appropriately cancels the
event. I then click "send" again, the mailitem.send event is skipped
and the application.itemsend event fires. I don't want to have any
custom code behind the application.item send. I can run the same
scenario on different machines and only find the problem with one
configuration but I can't figure out what it could be. This problems
occurs on specific Windows XP/Outlook 2003 machines.

Any help would be apprecatied.




--
amh


Ken Slovak - [MVP - Outlook] September 15th 09 06:28 PM

mailitem Send issue
 
Does the addin code run at all after that on that machine, or is the addin
getting disabled by an unhandled exception? If you open another item and
send it does the code fire? If not that would indicate an unhandled
exception as in my first question or something going out of scope. Other
than some rogue software on that machine that's all I can think of.

--
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


"amh" wrote in message
...

Ken,

If it was code I should have the same problem across all the machines.
Again it's just specific to one XP/Outlook 2003 machine. If I create a
new email, enter "abc" in the to: field then click send, the outlook
send event runs first before our custom code and notifies me I have an
invalid recipient, I fix it and then click send again and my custom
code never fires. So it seems whether it's Outlook canceling the send
or our custom code canceling the send, the next time the send button is
clicked our code is never called again. Let me know if you have any
additional insight. Just to reiterate it's specific to a machine. I
have 5 machines running xp/Outlook 2003 and 5 running vista/Outlook
2007 and the issue only occurs on one of the xp machines.



amh September 16th 09 01:26 AM

Yes the addin still runs. I can open another email or several emails at one time and the addin still runs. It's quite strange so I was hoping someone had come across this issue before.



Quote:

Originally Posted by Ken Slovak - [MVP - Outlook] (Post 323318)
Does the addin code run at all after that on that machine, or is the addin
getting disabled by an unhandled exception? If you open another item and
send it does the code fire? If not that would indicate an unhandled
exception as in my first question or something going out of scope. Other
than some rogue software on that machine that's all I can think of.

--
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


"amh" wrote in message
...

Ken,

If it was code I should have the same problem across all the machines.
Again it's just specific to one XP/Outlook 2003 machine. If I create a
new email, enter "abc" in the to: field then click send, the outlook
send event runs first before our custom code and notifies me I have an
invalid recipient, I fix it and then click send again and my custom
code never fires. So it seems whether it's Outlook canceling the send
or our custom code canceling the send, the next time the send button is
clicked our code is never called again. Let me know if you have any
additional insight. Just to reiterate it's specific to a machine. I
have 5 machines running xp/Outlook 2003 and 5 running vista/Outlook
2007 and the issue only occurs on one of the xp machines.


Ken Slovak - [MVP - Outlook] September 16th 09 02:26 PM

mailitem Send issue
 
All I can say is if this is on just one machine that the only way to
ultimately figure it out will be to compare the differences on that machine
and try to eliminate them one by one until you narrow it down.

--
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


"amh" wrote in message
...

Yes the addin still runs. I can open another email or several emails at
one time and the addin still runs. It's quite strange so I was hoping
someone had come across this issue before.




All times are GMT +1. The time now is 06:06 AM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com