Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CDO problem
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
CDO problem
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Divers
Thread ID:
01459718
Message ID:
01459718
Vues:
287
The following code successfully sends emails in the XpMode VPC of my Windows 7. However it shows the following message when I run it in the Windows 7 of the same computer.

"OLE IDispatch exception code 0 from CDO.Message.1: The transport failed to connect to the server."

Can anybody help?

Ben
TIA
*----- Code for testing ----------------------------
Local o
o = CreateObject("CDO.Message") 
     
* This section provides the configuration information for the remote SMTP server.
     
o.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
o.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") ="relay.welkin.com.hk"
o.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 
o.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = .T.
o.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
o.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
o.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") ="MyUsername"
o.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") ="MyPassword"
o.Configuration.Fields.Update

o.Subject="Example"
o.From="ben@mymailserver.com.hk"
o.To="myhotmailaccount@hotmail.com"
o.TextBody="This is a test"
o.Send
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform