Hello,
I have an application running MS VFP 7.0 on a W2K server, trying to send e-mail through an Exchange 2000 (SP3) server that resides internally on another W2K server. I am trying to use CDO to send a simple SMTP message to a customer. This code works well to any internal address, but I cannot make it send a message outside. Originally I was getting a relay error, so I added the code to do smtp authentication. Now it will not work at all. ANy help is greatly appreciated.
LPARAMETERS lc_FileName, lc_FirstName, lc_LastName, lc_Email
LOCAL lc_Body, lo, lo_Item
LOCAL objMail, objConfig, objFields
lc_Body = 'Dear ' + ALLTRIM(lc_FirstName) + ' ' + ALLTRIM(lc_LastName) + ';' + CHR(13) + CHR(13) + ...
objMail = CreateObject("CDO.Message"
objConfig = CreateObject("CDO.Configuration"
objFields = objConfig.Fields
WITH objFields
.Item(" 2 &&& SMTP/POP Server
.Item(" "mailserver"
.Item(" 25
.Item(" = 10
.Item(" = 1
.Item(" = "id"
.Item(" = "password"
.Update
ENDWITH
WITH objMail
.Configuration = objConfig
.From = "sales@gorb.net"
.To = lc_email
.Subject = "Home Comfort System Proposal from Recker and Boerger"
.TextBody = lc_Body
.AddAttachment(lc_FileName + ".PDF"
.Send
ENDWITH
RELEASE objMail, objConfig, objFields
RETURN
I have an application running MS VFP 7.0 on a W2K server, trying to send e-mail through an Exchange 2000 (SP3) server that resides internally on another W2K server. I am trying to use CDO to send a simple SMTP message to a customer. This code works well to any internal address, but I cannot make it send a message outside. Originally I was getting a relay error, so I added the code to do smtp authentication. Now it will not work at all. ANy help is greatly appreciated.
LPARAMETERS lc_FileName, lc_FirstName, lc_LastName, lc_Email
LOCAL lc_Body, lo, lo_Item
LOCAL objMail, objConfig, objFields
lc_Body = 'Dear ' + ALLTRIM(lc_FirstName) + ' ' + ALLTRIM(lc_LastName) + ';' + CHR(13) + CHR(13) + ...
objMail = CreateObject("CDO.Message"
objConfig = CreateObject("CDO.Configuration"
objFields = objConfig.Fields
WITH objFields
.Item(" 2 &&& SMTP/POP Server
.Item(" "mailserver"
.Item(" 25
.Item(" = 10
.Item(" = 1
.Item(" = "id"
.Item(" = "password"
.Update
ENDWITH
WITH objMail
.Configuration = objConfig
.From = "sales@gorb.net"
.To = lc_email
.Subject = "Home Comfort System Proposal from Recker and Boerger"
.TextBody = lc_Body
.AddAttachment(lc_FileName + ".PDF"
.Send
ENDWITH
RELEASE objMail, objConfig, objFields
RETURN