Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Smtp email
Message
De
17/02/2007 02:07:16
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Titre:
Divers
Thread ID:
01196470
Message ID:
01196775
Vues:
15
Thanks v much Samuel.

I see that requires your net extender for vfp.

Also on http://fox.wikis.com/wc.dll?Wiki~NETExtenderForVFP~VFP when I click on the http://www.etecnologia.net/ link I get prompted for a user name and password.

Nick

>Here is a sample using the System.Net.Mail classes of the .NET Framework.
>
>
>
>DO SendNetMessage
>
>PROCEDURE SendNetMessage
>LOCAL oMsg
>cYourAddress = "youruser@yourmail.com"
>cYourUser = "youruser@yourmail.com"
>cYourPassword = "yourpassword"
>
>oClient = CLRCreateObject("System.Net.Mail.smtpclient")
>oMsg = CLRCreateObject("System.Net.Mail.MailMessage")
>
>* Creates an attachment
>oAttachment = CLRCreateObject("System.Net.Mail.Attachment","c:\negocios\test.xls")
>
>oMsg.Attachments.Add(oAttachment)
>
>oMsg.From = CLRCreateObject("System.Net.Mail.MailAddress",m.cYourAddress)
>
>oSenderAddress = CLRCreateObject("System.Net.Mail.MailAddress",m.cYourAddress)
>
>oMsg.Subject = "This day of Valentine"
>oMsg.body = FILETOSTR("c:\negocios\valentine-2007.txt")
>
>* This is to authenticate with the SMTP server
>oCredentials = CLRCreateObject("System.Net.NetworkCredential",m.cYourUser,m.cYourPassword)
>oClient.Host = "localhost"
>
>oClient.Credentials = oCredentials
>
>m.cToAddress = "toAddress@ToServer.com"
>
>oToAddress = CLRCreateObject("System.Net.Mail.MailAddress",m.cToAddress)
>oMsg.To.Clear()
>oMsg.to.Add(m.oToAddress)
>WAIT WINDOW "Sending "+m.cToAddress NOWAIT
>oClient.Send(oMsg)
>
>
>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform