Page d'accueil
Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Login
ENGLISH
Accueil
ENGLISH
Plateforme Level Extreme
Login
Pratiques d'usage
Témoignages
Fichiers
Articles
Abonnement
Abonnez-vous ou renouveller
Bénéfices
Faites un don de 5$
Faites un don de 10$
Faites un don de 15$
Faites un don de 20$
Faites un don de 25$
Profil corporatif
Aperçu
Portfolio
Produits & Services
Services experts-conseils
Service entreprise
Hébergement Site Web
Infographie
Publication de livres
Support
Troubleshooting
Difficultés pour authentifier
Contactez-nous
Légal
Copyright
Politique de confidentialité
Termes & Conditions
English
Send Email Through Gmail
Message
De
23/05/2011 06:15:35
Sergey Berezniker
New York
,
États-Unis
À
23/05/2011 03:15:01
Mohammed Raniwala
DataSpeed
Inde
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Re:
Send Email Through Gmail
Divers
Thread ID:
01510492
Message ID:
01511464
Vues:
115
What is your question?
>LOCAL loConfig AS CDO.Configuration, loFlds AS Object, loMsg AS CDO.Message
>SET STEP ON
>loConfig = CREATEOBJECT("CDO.Configuration")
>
>loFlds = loConfig.Fields
>
>WITH loFlds
>
>*- Set the CDOSYS configuration fields to use port 25 on the SMTP server.
>
>.Item("
http://schemas.microsoft.com/cdo/configuration/sendusing
") = 2
>
>*- Enter name or IP address of remote SMTP server.
>
>.Item("
http://schemas.microsoft.com/cdo/configuration/smtpserver
") = "smtp.gmail.com"
>
>.Item("
http://schemas.microsoft.com/cdo/configuration/smtpserverport
") = 465
>
>*- Assign timeout in seconds
>
>.Item("
http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout
") = 10
>
>.Item("
http://schemas.microsoft.com/cdo/configuration/smtpusessl
") = .t.
>
>*- Commit changes to the object
>
>.Item("
http://schemas.microsoft.com/cdo/configuration/sendusername
") = "
youraccout@gmail.com
"
>
>.Item("
http://schemas.microsoft.com/cdo/configuration/sendpassword
") = "password"
>
>.Item("
http://schemas.microsoft.com/cdo/configuration/smtpauthenticate
") = 3
>
>* .item("
http://schemas.microsoft.com/cdo/configuration/cdoURLProxyServer
") = "smtp.mail.yahoo.com"
>
>.Update()
>
>ENDWITH
>
>*- Create and send the message.
>
>loMsg = CREATEOBJECT("CDO.Message")
>
>WITH loMsg
>
>.Configuration = loConfig
>
>.To = "
test@test.com
"
>
>.From = "
youraccount@gmail.net
"
>
>.Subject = "This is a test of CDO sending e-mail"
>
>.HTMLBody = "This is the HTML content of the mail message"
>
>.AddAttachment("path of the file")
>
>*- Set priority to HIGH if needed
>
>*!* IF tlUrgent
>
>*!* .Fields("Priority").Value = 1 && -1=Low, 0=Normal, 1=High
>
>*!* .Fields.Update()
>
>*!* ENDIF
>
>TRY
>
>.Send()
>
>CATCH TO oerr
>
>MESSAGEBOX(oerr.message)
>
>ENDTRY
>
>ENDWITH
--sb--
Précédent
Répondre
Fil
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement
Click here to load this message in the networking platform
Plateforme Level Extreme
Pratiques d'usage
Témoignages
Fichiers
Articles
Abonnement
Abonnez-vous ou renouveller
Bénéfices
Faites un don de 5$
Faites un don de 10$
Faites un don de 15$
Faites un don de 20$
Faites un don de 25$
Profil corporatif
Aperçu
Portfolio
Produits & Services
Services experts-conseils
Service entreprise
Hébergement Site Web
Infographie
Publication de livres
Support
Troubleshooting
Difficultés pour authentifier
Contactez-nous
Légal
Copyright
Politique de confidentialité
Termes & Conditions
Login
Google
Copyright © 1993-2024 par Level Extreme Inc. Tous droits réservés · Site Web conçu par
levelextreme.com