Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sending email with Outlook
Message
De
25/10/2001 09:15:44
 
 
À
25/10/2001 08:33:23
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00573108
Message ID:
00573127
Vues:
26
>Are there any examples of using VFP to send email through Outlook?
>
>Thanks,
>
>Jerryt

Here is a small example of how I do it:

#DEFINE MAILITEM 0
#DEFINE IMPORTANCELOW 0
#DEFINE IMPORTANCENORMAL 1
#DEFINE IMPORTANCEHIGH 2

oOutLookObject = CreateObject("Outlook.Application")
oEmailItem = oOutLookObject.CreateItem(MAILITEM)

WITH oEmailItem
.To = "myself@mymailaddress.com;someone@somewhere.com"
.Subject = "Sending Email from within Foxpro to multiple recipients and with attachments"
.Importance = IMPORTANCENORMAL
.Body = "I'm now testing sending to multiple recipients in the .To value from within my app and mulitple attachments too."
.Attachments.Add("c:\temp\myfile.txt")
.Attachments.Add("C:\temp\junk.txt")
.Send
ENDWITH

RELEASE oEmailItem
RELEASE oOutLookObject
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform