Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding attachments to an e-mail via FoxPro
Message
De
04/05/1998 13:46:30
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Divers
Thread ID:
00096771
Message ID:
00096782
Vues:
15
>Does anyone know how to automatically add an attachment to an e-mail generated by FoxPro (using the Windows OLE)?
>
>Thanks in advance
>
>Jorge Ferreira
>cardinal2@mail.telepac.pt

It's just a sample:
if type('oSession')<>"O"
	oSession=createobject("MAPI.Session")
	oSession.Logon("MS Exchange Settings",.f.)
endif
oMessage=oSession.OutBox.Messages.Add()
oMessage.Subject="Email Test"
oMessage.Text="Skol'ko mozhno zhdat'"
oAttach=oMessage.Attachments.Add()
With oAttach
	.type=1
	.name="c:\temp\text1.txt"
	.readfromfile("c:\temp\text1.txt")
endwith
oAttach.name="text1.txt"
oRecipient=oMessage.Recipients.Add()
with oRecipient
	.Name="ed pikman"
	.Address="SMTP:epikman@usa.net"
	.AddressEntry.Type="SMTP"
	.AddressEntry.Address="epikman@usa.net"
endwith
oMessage.Update()
oMessage.Send(.t.,.f.)
Edward Pikman
Independent Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform