Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Send / Receive E-mail using FoxPro 5
Message
De
15/11/1997 00:19:07
Christopher Holtz
Integral Computer Services, Inc.
Rochester, New York, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Divers
Thread ID:
00060371
Message ID:
00060409
Vues:
37
If you use the Outlook automation object model, you can use the following
piece of code to send an e-mail from foxpro 5.0


oSession = Create('Mapi.Session')
oSession.Logon() && Specify the a profile name to skip the dialogue

oMessage = oSession.OutBox.Messages.Add()
oMessage.Subject = ''
oMessage.Text = ''

oRecipient = oMessage.recipients.add()
oRecipient.Name='' && e-mail address
oRecipient.Type = 1 && (1= send to , 2 = cc line , 3 = Bcc line)

omessage.send(.t.,.f.) && .t. to save message, .f. to suppress visual dialogue

oSession.DeliverNow() && immediate delivery of all undelivered messages

- Chris


>>I Have 48 hours to come up with a way for a FoxPro Application to be able to
>>send and receive E-mail.
>>
>>Does anyone know what the best method of doing this would be?
>
>One way would be to have FoxPro access Outlook or Exchange client through OLE automation. There's a help file on the Office '97 or Outlook CD that has information about the Outlook object model. You would need to have Outlook running on the same machine as VFP and receiving mail. It would be fairly easy to send and read the mail from VFP. If you just need to send mail, check out SENDMAIL.SCX in the VFP\SAMPLES\SOLUTION\OLE directory. It has an example of sending mail using the two MAPI ActiveX controls that come with VFP.
>
>Good luck!
>
>Josh
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform