ebpowers72
New Member
Progress 9.1D Win2K
Hello All,
I've been directed to update our general mail module to use cdo and smtp instead of the mapi com objects that we currently use. I was fortunate enough to find some very helpful code on this very site - which is included below. Everything works fine when I use internal email addresses. However when I use external addresses, I get the following error.
"Error occurred while accessing component property/ methods send server rejected one or more addresses server response was 550 5.7.1 unable to relay for email@yahoo.com error code: 0x80020009 (5890)".
DEFINE VAR flds AS COM-HANDLE.
DEFINE VAR iMsg AS COM-HANDLE.
DEFINE VAR iConf AS COM-HANDLE.
DEFINE VAR rcSet AS COM-HANDLE.
CREATE "Adodb.Recordset" rcSet.
flds = rcSet:FIELDS.
CREATE "CDO.Message" iMsg.
CREATE "CDO.Configuration" iConf.
Flds = iConf:FIELDS.
Flds:ITEM("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2.
Flds:ITEM("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "my.server.address".
Flds:UPDATE().
ASSIGN
iMsg:Configuration = iConf
iMsg:TO = "ebpowers@yahoo.com"
imsg:FROM = "bpowers@eb2b.com"
iMsg:subject = "Hello World".
iMsg:AddAttachment("c:\temp\dtl030611.csv",,).
iMsg:SEND.
RELEASE OBJECT flds.
RELEASE OBJECT iMsg.
RELEASE OBJECT iConf.
RELEASE OBJECT rcSet.
Any ideas?
ebp
Hello All,
I've been directed to update our general mail module to use cdo and smtp instead of the mapi com objects that we currently use. I was fortunate enough to find some very helpful code on this very site - which is included below. Everything works fine when I use internal email addresses. However when I use external addresses, I get the following error.
"Error occurred while accessing component property/ methods send server rejected one or more addresses server response was 550 5.7.1 unable to relay for email@yahoo.com error code: 0x80020009 (5890)".
DEFINE VAR flds AS COM-HANDLE.
DEFINE VAR iMsg AS COM-HANDLE.
DEFINE VAR iConf AS COM-HANDLE.
DEFINE VAR rcSet AS COM-HANDLE.
CREATE "Adodb.Recordset" rcSet.
flds = rcSet:FIELDS.
CREATE "CDO.Message" iMsg.
CREATE "CDO.Configuration" iConf.
Flds = iConf:FIELDS.
Flds:ITEM("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2.
Flds:ITEM("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "my.server.address".
Flds:UPDATE().
ASSIGN
iMsg:Configuration = iConf
iMsg:TO = "ebpowers@yahoo.com"
imsg:FROM = "bpowers@eb2b.com"
iMsg:subject = "Hello World".
iMsg:AddAttachment("c:\temp\dtl030611.csv",,).
iMsg:SEND.
RELEASE OBJECT flds.
RELEASE OBJECT iMsg.
RELEASE OBJECT iConf.
RELEASE OBJECT rcSet.
Any ideas?
ebp