The problem of mail not going out only occurs on Outlook 2007, not 2003.
I believe it is caused by the interception of Explorer's SelectionChange
event.
//class level variable to hold event handler
private Outlook.Explorer explorer = null;
private void ThisAddIn_Startup(object sender, System.EventArgs e)
{
explorer = this.Application.ActiveExplorer();
explorer.SelectionChange += new
Outlook.ExplorerEvents_10_SelectionChangeEventHand ler(ThisAddIn_SelectionChanged);
}
private void ThisAddIn_SelectionChanged()
{
// only handle appointments, nothing else
if (explorer.Selection.Count 0 && explorer.Selection[1] is
Outlook.AppointmentItem)
{
...
}
}
Once a new mail is created, Outlook put it into Outbox folder and fires 3
SelectionChange events.
I know JavaScript DOM event bubble up and vaguely remember one article
mentioned about passing Outlook event out of event handler. How do I pass
the Explorer's SelectionChange event back to Outlook, so Outlook can handle
it as usual?
"Ken Slovak - [MVP - Outlook]" wrote in message
...
Usually if an addin is disabled that way it means you have unhandled
exceptions, a cardinal sin for addins. Or that you aren't using a shim to
get your own AppDomain for the addin and some other code in that same
AppDomain is crashing Outlook or has unhandled exceptions.
If it remains in Outbox are you messing with the items after they're sent,
or accessing them in Outbox, or not releasing the object references?
--
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
"Jason" wrote in message
...
The add-in was in the Disabled Items list. After enable it, the add-in
was loaded and the menu appeared. But now email won't go out. They stay
in Outbox forever.
I remember someone had the same email problem and asked for help a while
ago but I could not retrive the mail.It was gone.