Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MAPI problem with Win2000
Message
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00494946
Message ID:
00494994
Views:
12
Hi Erik:

On the Win2000 machine, which is my development box, I'm running both Outlook and Outlook Express, but I only use Outlook Express. On the Win98 machine, I'm using Outlook Express only. Here is the code from the Send Method of the main form. Thanx.

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.lstRecipients.LISTCOUNT - 1
.RecipIndex = i
.RecipDisplayName = THISFORM.lstRecipients.LIST(i + 1)
.RecipType = 1
NEXT

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

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

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

.SEND(.F.)

ENDWITH

THISFORM.oMapiSession.SignOff()
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform