Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CDOsys email receipt
Message
 
 
À
01/04/2016 08:46:56
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01634136
Message ID:
01634141
Vues:
105
See https://support.microsoft.com/en-us/kb/302839 and https://www.berezniker.com/comment/284#comment-284

>Can anyone please tell me how to request a delivery receipt using the CDOSYS email system?
>
>Many thanks!
>
>This is pretty much what I am using:
>
>LOCAL loConfig AS CDO.Configuration, loFlds AS Object, loMsg AS CDO.Message
>
>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.mail.yahoo.com" && "smtp.gmail.com"
>.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465 && 467
>
>*- Assign timeout in seconds
>.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 20
>.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = .t. && .f.
>.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "username"
>.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") ="password"
>.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
>
>.Update()
>ENDWITH
>
>*- Create and send the message.
>loMsg = CREATEOBJECT("CDO.Message")
>WITH loMsg
>
>.Configuration = loConfig
>.To = "sur200@indiatimes.com"
>.From = "username@yahoo.com"
>.Subject = "This is a test of CDO sending e-mail"
>.HTMLBody = "This is the HTML content of the mail message"
>
>
>TRY
>.Send()
>MESSAGEBOX("Email Sent Successfully")
>CATCH TO oerr
>MESSAGEBOX(SUBSTR(oerr.message,AT(":",oerr.message)+1,LEN(oerr.message)))
>ENDTRY
>ENDWITH
>
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform