Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cdo2000
Message
 
À
05/11/2018 11:07:24
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Application:
Desktop
Divers
Thread ID:
01663144
Message ID:
01663145
Vues:
76
J'aime (1)
>I am trying to send emails with CD0 2000 using my Office365 account. It doesn't work. Anyone could tell me what needs to be done?
loMessage = CREATEOBJECT("CDO.Message")
loMessage.Subject = "Test Mail"
loMessage.From = "YourEmail@yourdomain.com"
loMessage.To = "you@youremail.com"
loMessage.CC = ""
loMessage.TextBody = "my text body here"

Configuration = CreateObject("CDO.Configuration")
Configuration.Load( -1)
Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.office365.com"
Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "YourEmail@yourdomain.com"
Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "YourPass"
Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = .t.

Configuration.Fields.Update()

loMessage.Configuration = Configuration
loMessage.Send()
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform