Link to home
Start Free TrialLog in
Avatar of pokrakam
pokrakamFlag for United Kingdom of Great Britain and Northern Ireland

asked on

MAPI automatic logon

How do I get my app to logon to a profile on startup. At present it pops up a dialog asking for Profile Name.
If I specify a profile (other than 'Microsoft Outlook') error 32003 makes it's presence known.
Avatar of mrmick
mrmick

Someone may be able to help you if you povided details.  You've got the code in front of you and you couldn't figure it out.   How do you expect someone else to help you without having a clue what the code looks like, what version of VB you're running, etc...
Avatar of pokrakam

ASKER

Sorry, lack of detail.
NT4, VB5 SP3. The mail clients are (on various machines): Outlook, Windows Messaging (NT), Exchange.
I'm using VB's MAPI session control.
The problem is to use mail without running Exchange etc. in background, and without the app asking for a profile name upon startup.

Throw away the control....Use the COM object directly...I have automatic SQL DB Status checking programs that only use 15 lines of code to complete the EMail process without user intervention.... I pickup the subroutine from MS doc on thier web site.....and uesd it without much modfication...
jrmno1, lack of detail

pokrakam, if you want code to send email with the winsock control only, I can send you code which I wrote to accomplish this.  email me at mick@owen.wa.com if this sounds like the solution to your problem.
Thanx all, I will keep that in mind.
However, at present I'm sitting with a huge amount of code I inherited a while ago. The app is an EDI message processing / distribution server - i.e. works with a lot of email/X400.
Unfortunately, until my planned rewrite in about a year's time, I'm stuck with MAPI Session controls.

ASKER CERTIFIED SOLUTION
Avatar of rantanen
rantanen

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Yup, was something I already knew, but it did prompt me to try something which did work:
I initially just tried entering the profile name in the Control properties on the form. The idea was to get it working, then I'll write the code to retrieve profile name from registry, assign it to the control etc. The catch is, if I fill it in the properties box, it don't work (except for 'Microsoft Outlook'), but if I assign it in the code, it does.   Bug??? Hmmmm...... (I do feel rather stupid nevertheless)
Thanx