Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Mapi session question
Message
 
À
10/04/2001 19:35:54
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00494222
Message ID:
00494352
Vues:
54
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()
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform