I apologize for the cross-post but I am uncertain which grp would be more
appropriate.
Hello group:
I have an application written in C# that retrieves messages in a user's
inbox, parses them into a SOAP request and then calls our corp webservice.
I have completed the process minus one detail which is really troubling me.
When the app is open, I periodically refresh the messages by calling
DeliverNow() of the session object, but no new messages are ever received.
Of course, if I open Outlook under the profile the application uses, the
mails are received. Then, of course, they are reflected in my application
at the next refresh.
Some info:
I am creating the session with the following method call:
Object [] args = new Object[7];
args[0] = Missing.Value; // ProfileName
args[1] = Missing.Value; // ProfilePassword
args[2] = true; // ShowDialog
args[3] = true; // NewSession
args[4] = 0; // ParentWindow
args[5] = false; // NoMail
args[6] = Missing.Value; // ProfileInfo
t.InvokeMember("Logon", BindingFlags.InvokeMethod, null,
currentSession, args);
The 'NoMail' arg is set to false so I should be linking into the mail
spooler and I do see the 'Send/Receive' dialog, so it looks like it is
trying, but no new messages ever arrive. If I attempt to forward a message
from this app, it delivers the message without issue. This is a rewrite of
my original app which was an Outlook automation program (which worked fine)
and I'm trying to duplicate my old program's functionality, but with no
success. The understanding I had from the documentation is that the
'DeliverNow' method would retrieve the 'pending' messages. Is this
incorrect? Is there something I'm missing regarding profiles?
Any advice will be much appreciated and TIA,
Alex
Archived from group: microsoft>public>dotnet>languages>csharp