Windows Server Forum / Exchange Server / Clients / May 2005
CDO-generated message stays in outbox on this computer
|
|
Thread rating:  |
Vadim Rapp - 21 May 2005 02:24 GMT Hello:
I'm trying to send a message using CDO 1.21 through Exchange 2000. The message stays in outbox. The code I'm iusing is the sample at http://msdn.microsoft.com/library/en-us/cdo/html/_olemsg_creating_and_sending_a_ message.asp.
Note that the message is in outbox already in the Exchange store. I can connect to Exchange from another computer, and I see it in Outbox. That looks like the problem lies outside of my computer.
But, when I'm running the same client code at another computer, it gets delivered instantly.
What might be causing this? I googled for several hours, found dozens of posts about messages staying in the outbox, but not a single explanation.
thanks,
Vadim Rapp
Dmitry Streblechenko - 23 May 2005 17:40 GMT Does the recipient actually receive the message? What is your Outlook version?
Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool
> Hello: > [quoted text clipped - 16 lines] > > Vadim Rapp Vadim Rapp - 24 May 2005 23:31 GMT Hello Dmitry: You wrote in conference microsoft.public.exchange2000.clients,microsoft.public.win32.programmer.messaging on Mon, 23 May 2005 09:40:18 -0700:
DS> Does the recipient actually receive the message?
No. I saw the article discussing that effect when it's sent but appears as not. In my case, the message is not sent indeed.
DS> What is your Outlook version?
2002 SP3.
Vadim
Dmitry Streblechenko - 25 May 2005 00:13 GMT Is Outlook online (connected to Exchange) when your message is being sent?
Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool
> Hello Dmitry: > You wrote in conference [quoted text clipped - 11 lines] > > Vadim Vadim Rapp - 25 May 2005 04:18 GMT Hello Dmitry, You wrote in conference microsoft.public.exchange2000.clients,microsoft.public.win32.programmer.messaging on Tue, 24 May 2005 16:14:30 -0700:
DS> Is Outlook online (connected to Exchange) when your message is being DS> sent?
No, Outlook is not started.
thanks,
Vadim
Dmitry Streblechenko - 25 May 2005 21:37 GMT I meant offline (cached) vs online store...
Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool
> Hello Dmitry, > You wrote in conference [quoted text clipped - 9 lines] > > Vadim Vadim Rapp - 27 May 2005 12:44 GMT Hello, You wrote on Wed, 25 May 2005 13:37:03 -0700:
DS> I meant offline (cached) vs online store...
It's outlook 2002, not 2003. Once outlook is started, it sends the message soon, w/o any efforts on my part.
thanks, Vadim
Raffi - 23 May 2005 23:23 GMT Are you able to send a message from within Outlook itself without the message hanging in the outbox ?
Which version of Outlook are you using?
> Hello: > [quoted text clipped - 15 lines] > > Vadim Rapp Vadim Rapp - 24 May 2005 23:32 GMT Hello Raffi: You wrote in conference microsoft.public.win32.programmer.messaging,microsoft.public.exchange2000.clients on Mon, 23 May 2005 15:23:01 -0700:
R> Are you able to send a message from within Outlook itself without the R> message hanging in the outbox ?
Yes. Also, if I start Outlook and perform "send/receive", the message goes.
R> Which version of Outlook are you using?
2002 SP3.
thanks,
Vadim Rapp
Henry Gusakovsky - 25 May 2005 08:21 GMT What about this option in Outlook:
Tools->Options->Mail Setup-> Send immediately when connected Is it checked ?
WBR Henry
> Hello Raffi: > You wrote in conference microsoft.public.win32.programmer.messaging,microsoft.public.exchange2000.cl ients
> on Mon, 23 May 2005 15:23:01 -0700: > [quoted text clipped - 10 lines] > > Vadim Rapp Vadim Rapp - 25 May 2005 20:16 GMT Hello Henry: You wrote on Wed, 25 May 2005 10:21:14 +0300:
HG> What about this option in Outlook:
HG> Tools->Options->Mail Setup-> Send immediately when connected HG> Is it checked ?
It is checked; and yes, Outlook, when started, does send the message from the outbox. The problem is to send it without Outlook.
I forgot to mention that I also inserted session.delivernow in the program, which is supposed to send anything unsent; no effect.
thanks,
Vadim
Raffi - 27 May 2005 03:40 GMT Try changing this line just for a test:
objMessage.Send showDialog:=False
To: objMessage.Send showDialog:=True
And see the outcome.
You are using Outlook 2002, so there is also the Outlook security model that you need to make sure lets your program send messages.
> Hello Raffi: > You wrote in conference [quoted text clipped - 13 lines] > > Vadim Rapp Vadim Rapp - 27 May 2005 13:03 GMT Hello, You wrote on Thu, 26 May 2005 19:40:02 -0700:
R> Try changing this line just for a test:
R> objMessage.Send showDialog:=False
R> To: R> objMessage.Send showDialog:=True
R> And see the outcome.
it showed the message; I sent it; the message stayed in the outbox.
In my email cp applet I have specified "ask for profile". Now that I specified showdialog=true, I got not one but two prompts for the proile: one on objSession.Logon; then another when I clicked "send" in the message.
thanks,
Vadim
Raffi - 27 May 2005 15:14 GMT And you are not getting any security popups while running this code?
Did you try creating a new profile and testing with that newer profile?
> Try changing this line just for a test: > [quoted text clipped - 25 lines] > > > > Vadim Rapp Vadim Rapp - 27 May 2005 19:16 GMT Hello Raffi: You wrote on Fri, 27 May 2005 07:14:03 -0700:
R> And you are not getting any security popups while running this code?
R> Did you try creating a new profile and testing with that newer profile?
No popus; no errors, including to "delivernow"; yes, tried new profile, same result.
I wonder, how sending the message occurs in Exchange. Since the initial message is created already in Outbox, and it can be there under composition for some time, at what point Exchange decides it's time to deliver it? is it some signal from the client application? of maybe some flag in the message itself?
thanks,
Vadim Rapp
Henry Gusakovsky - 28 May 2005 16:10 GMT There is no requirement to Create message in the Outbox.
Exchange is store provider is tightly coupled to it's transport provider. So it can send messages without MAPI spooler. But before sending it asks MAPI subsystem if that message should be processed by spooler. So if MAPI returns yes Exchange provider just adds message to the it's outgoing queue. That queue can be flushed in the Outlook up to 2000 version. Since Outlook XP flushing spooler outgoing queue is broken.
So you need to imitate click on the 'Send/Receive' button.
WBR Henry
> Hello Raffi: > You wrote on Fri, 27 May 2005 07:14:03 -0700: [quoted text clipped - 15 lines] > > Vadim Rapp
|
|
|