MAPI Session Problem - Getting Profile? 
Author Message
 MAPI Session Problem - Getting Profile?

How do I specify which profile the session object should use?

When I set the NewSession property to true the SignOn method errors
with a Logon failure error.  If I set the LogonUI property to true the
login dialog is displayed and I can select the profile and logon no
problem.

However, the code needs to run as an NT Service (No UI)

Hence, my question is, how do I specify which profile to use so I
don't get the prompt?

Many Thanks
Darren Lewis



Sun, 24 Feb 2002 03:00:00 GMT  
 MAPI Session Problem - Getting Profile?
If you know the profile ID/name (Windows Messaging) then try this.
It should return a valid Session ID without an interface.

MapiSess.Username="supply a valid profile name/ID"
MapiSess.Action= 1 '(mapSignOn)
MapiSess.NewSession=True
MapiMess.SessionID=MapiSess.SessionID

Hope this helps



Quote:
> How do I specify which profile the session object should use?

> When I set the NewSession property to true the SignOn method errors
> with a Logon failure error.  If I set the LogonUI property to true the
> login dialog is displayed and I can select the profile and logon no
> problem.

> However, the code needs to run as an NT Service (No UI)

> Hence, my question is, how do I specify which profile to use so I
> don't get the prompt?

> Many Thanks
> Darren Lewis

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


Sun, 24 Feb 2002 03:00:00 GMT  
 MAPI Session Problem - Getting Profile?
Did you use MAPI control. if it's true, please forget it and use CDO or
MAPI APIs. It wil give you a chance to set profile without prompt.

Phuong that Ton

Quote:
> ----------


> Posted At:         08 September 1999 13:52
> Posted To:         misc
> Conversation:      MAPI Session Problem - Getting Profile?
> Subject:   MAPI Session Problem - Getting Profile?

> How do I specify which profile the session object should use?

> When I set the NewSession property to true the SignOn method errors
> with a Logon failure error.  If I set the LogonUI property to true the
> login dialog is displayed and I can select the profile and logon no
> problem.

> However, the code needs to run as an NT Service (No UI)

> Hence, my question is, how do I specify which profile to use so I
> don't get the prompt?

> Many Thanks
> Darren Lewis



Sun, 24 Feb 2002 03:00:00 GMT  
 MAPI Session Problem - Getting Profile?

Darren,

     Specify it it the mapiSession .Username Property.  You can find
     the available Profiles (or set up a new one) in Control Panel,
     "Mail and Fax".

HTH,
    Phill  W.

Quote:

> How do I specify which profile the session object should use?



Mon, 25 Feb 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. MAPI Session Control and profiles

2. getting default mail profile using MAPI control

3. Getting User Information from existing Mail Session in MAPI

4. Getting default MAPI session name

5. Mapi problem using multiple mailboxes/profiles..

6. Mapi Problem using multiple mailboxes/profiles..

7. Problem with MAPI controls, Exchange Profile requested

8. Mapi Profile Problem

9. MAPI Session & MAPI Messages

10. MAPI Session Problems

11. Problem creating MAPI session

12. Problem in exporting the report to a MAPI session

 

 
Powered by phpBB® Forum Software