Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
OLE Messaging
Message
De
29/11/1997 05:54:23
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
OLE Messaging
Divers
Thread ID:
00062845
Message ID:
00062845
Vues:
72
I'm trying to send e-mail to several people and I'm using OLE messagin instead of the mail ocx that comes with VFP. I tried putting the code in a SCAN/ENDSCAN loop. It works for the first record but bombs on succeeding records. How do I accomplish this in the most efficient manner? (Code is taken from KB article on OLE messaging with mods).

USE o:\apps\data\analysts in 0
GO top

SESSION=CREATEOBJECT('mapi.session')
SESSION.LOGON

NEW=SESSION.OUTBOX.MESSAGES.ADD
NEW.SUBJECT = "Test Mail with OLE Messaging"
NEW.TEXT="Mail System Test"+CHR(13)+"using OLE!"+chr(13)


SELECT analysts
SCAN
SENDTO=NEW.RECIPIENTS.ADD
SENDTO.NAME=alltrim(analysts.emailaddress)
SENDTO.TYPE=1
SENDTO.RESOLVE

NEW.ReadReceipt = .T.
NEW.DeliveryReceipt = .T.
NEW.UPDATE
NEW.SEND(1,0,0)
ENDSCAN
SESSION.LOGOFF
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform