Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CDOsys email receipt
Message
From
01/04/2016 08:46:56
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
CDOsys email receipt
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01634136
Message ID:
01634136
Views:
136
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
Next
Reply
Map
View

Click here to load this message in the networking platform