MAPI Session

swift
09-19-2000, 05:18 PM
How do I start a MAPI session?

I've tried, but can't figure it out, I think I need to reference one of the dll's but I can't find the right one.

Can someone help?

Dim mpsSession As MAPISession
mpsSession.UserName = "myusername"
mpsSession.Password = "mypassword"
mpsSession.SignOn
mpsSession.SignOff

I think the code is right... Once I get this working, can anyone tell me if the code to actually compose and send messages is easy, or are there catches to it?

TIA

Steve

whelanp
09-20-2000, 08:15 AM
You need to include the Component ie not a ref to

Microsoft MAPI controls x

then put a session and message control on your form.

Then use something like the following:

With mpsSession
.UserName = [YOUR USER NAME] this can be tricky to determine
.SignOn
End With

With mpsMsgs
.SessionID = mpsSession.SessionID
.Compose
.RecipAddress = [AN EMAIL ADDRESS]
.ResolveName
.MsgNoteText = "Body Text"
.MsgSubject = "My Email"
.Send False
End With


Thats pretty much it.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum