mailitem Send issue

A

amh

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

Ken Slovak - [MVP - Outlook]

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

amh

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
new email, enter "abc" in the to: field then click send, the outloo
send event runs first before our custom code and notifies me I have a
invalid recipient, I fix it and then click send again and my custo
code never fires. So it seems whether it's Outlook canceling the sen
or our custom code canceling the send, the next time the send button i
clicked our code is never called again. Let me know if you have an
additional insight. Just to reiterate it's specific to a machine.
have 5 machines running xp/Outlook 2003 and 5 running vista/Outloo
2007 and the issue only occurs on one of the xp machines.


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




"amh" (e-mail address removed) 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.
 
K

Ken Slovak - [MVP - Outlook]

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

amh

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



'Ken Slovak - [MVP - Outlook said:
;323318']Does the addin code run at all after that on that machine, o
is the addin
getting disabled by an unhandled exception? If you open another ite
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.




"amh" (e-mail address removed) wrote in message

Ken,

If it was code I should have the same problem across all th
machines.
Again it's just specific to one XP/Outlook 2003 machine. If I creat
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 hav
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 butto
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.
 
K

Ken Slovak - [MVP - Outlook]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top