Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sending HTML Emails using FOX
Message
From
08/05/2002 06:46:03
 
 
To
08/05/2002 04:53:50
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00653430
Message ID:
00653895
Views:
30
For completeness, this was the resolution to the problem
LOCAL cdoMessage AS CDO.Message
LOCAL cdoConfig  AS CDO.Config

cdoHTML = FILETOSTR("FIRSTPAGE.HTM") && generic HTML File
cdoMessage = CREATEOBJECT("CDO.Message")
cdoConfig  = CREATEOBJECT("CDO.Configuration")

cdoFields = cdoConfig.Fields
cdoFields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
cdoFields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "10.100.100.75"  && IP address of the SMTP server
cdoFields.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 100
cdoFields.Update

cdoMessage.Configuration = cdoConfig
cdoMessage.From = "someone@somewhere.com"
cdoMessage.To   = "someoneelse@somewhere.com"
cdoMessage.Subject = "this is a test message"
cdoMessage.HTMLBody = cdoHTML
cdoMessage.Send

RELEASE cdoHTML
RELEASE cdoMessage
RELEASE cdoConfig
RELEASE cdoFields
The only areas that need changing are the SMTP Server. This can be an IP address or a server name, and the HTML File you wish to send.
Previous
Reply
Map
View

Click here to load this message in the networking platform