Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Mapi session question
Message
 
To
10/04/2001 19:35:54
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00494222
Message ID:
00494352
Views:
49
WITH THISFORM.oMapiSession

.DownloadMail = .F.
.SignOn()
SET DEFAULT TO (oApp.HOMEDIR)

IF (.SessionID > 0)
THISFORM.oMAPImsg.SessionID = .SessionID
WAIT WINDOW 'Logged In' NOWAIT
ELSE
WAIT WINDOW 'Login failed' NOWAIT
RETURN
ENDIF

ENDWITH

WITH THISFORM.oMAPImsg

.MsgIndex = -1
.Compose()

*- Get Recipients
FOR i = 0 TO THISFORM.cboRecipients.LISTCOUNT - 1
.RecipIndex = i
.RecipDisplayName = THISFORM.cboRecipients.LIST(i + 1)
.RecipType = 1
NEXT

*- Get CC's
FOR j = 0 TO THISFORM.cboCC.LISTCOUNT - 1
.RecipIndex = j + i
.RecipDisplayName = THISFORM.cboCC.LIST(j + 1)
.RecipType = 2
NEXT

.MsgSubject = THISFORM.txtSubj.VALUE
.MsgNoteText = THISFORM.edtMsg.VALUE

*- Get Attachments
FOR i = 0 TO THISFORM.cboAttach.LISTCOUNT - 1
.AttachmentIndex = i
.AttachmentPosition = IIF(i = 0, 0, LEN(.MsgNoteText) - i)
.AttachmentPathName = oApp.exportdir + '\' + ALLTR(THISFORM.cboAttach.LIST(i + 1))
NEXT

.SEND(.F.)

ENDWITH

THISFORM.oMapiSession.SignOff()
Previous
Reply
Map
View

Click here to load this message in the networking platform