I am sending email using CDO but it only seems to work when the "To"
address is within the same domain as mine. When I send to an outside
domain (eg. yahoo.com) the mail simply does not reach the recipient.
I have been testing this with my own email address. There is no error
reported and everything "appears" to have worked except for the fact the
email does not reach the recipient. I had this problem with CDONTS and
thought that CDOSYS would resolve it?
Any ideas? Here's the source:
<!--METADATA TYPE="typelib" UUID="CD000000-8B95-11D1-82DB-00C04FB1625D"
NAME="CDO for Windows 2000 Type Library" -->
<!--METADATA TYPE="typelib" UUID="00000205-0000-0010-8000-00AA006D2EA4"
NAME="ADODB Type Library" -->
<%
DIM sBody, sFrom, sSender, sSubject, sTo, x
sBody = "Test content body, will it work"
sFrom = "ma**@binarybaby.co.uk" ' (binarybaby.co.uk is my site domain)
sSender = "ma**@binarybaby.co.uk"
sSubject = "Test"
sTo = "so****************@yahoo.com" ' (any outside email address)
' mail section - setup of cdo for 2000
DIM iMsg, Flds, iConf
Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
Flds(cdoSMTPAuthenticate) = cdoAnonymous
Flds.Update
With iMsg
Set .Configuration = iConf
.To = sTo
.From = sFrom
.Sender = sSender
.Subject = sSubject
.TextBody = sBody
.Send ' << apparently works (no errors)
End With
' this bit DOES get output so appears to have worked.
response.Write "sent the mail to " & sTo
%>
Thanks!
Owen.