By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,925 Members | 732 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,925 IT Pros & Developers. It's quick & easy.

CDO.Send - does not appear to work sending to outside domains.

P: n/a
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.
Jul 19 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
look in the BadMail folder, see what's up with the message

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
"Owen" <sp**@spam.com> wrote in message
news:40**********************@news.dial.pipex.com. ..
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.

Jul 19 '05 #2

P: n/a
This is probably an SMTP relaying issue which goes beyond the scope of ASP.
Talk to your network administrator and tell him that your server needs to be
permitted to relay messages.

Ray at work

"Owen" <sp**@spam.com> wrote in message
news:40**********************@news.dial.pipex.com. ..
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.

Jul 19 '05 #3

P: n/a
http://www.aspfaq.com/2511

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"Owen" <sp**@spam.com> wrote in message
news:40**********************@news.dial.pipex.com. ..
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.

Jul 19 '05 #4

P: n/a
Hello Owen,

I reviewed the code and doesn't find any obvious thing in it. The problem
now is that the email can be sent to same domain, however, it can't be sent
to external email address, right?

For methods on sending email in asp, please refer to
http://www.pstruh.cz/tips/detpg_send-email-from-asp.htm. There are many
sample codes on it.

However, for this specific problem, based on my experience, it should be
more related to system setting instead of coding. Please refer to the
following sentence in <<SMTP Service Release Notes>>

-------------------
Because of the growing problem on the Internet concerning Unsolicited
Commercial E-Mail (UCE), Microsoft SMTP Service, by default, does not allow
mail to be relayed through it to an external e-mail address. Mail addressed
to any domain not configured for the SMTP site is rejected with the error
"550 Unable to relay for <mail address>." To allow mail to be relayed from
specific IP
addresses, change the settings in the "Relay Restrictions" section of the
"Directory Security" property sheet.

NOTE: Changing the settings to allow unrestricted relay through your SMTP
server on the Internet makes your site a prime target for UCE. UCE can
consist of special offers, commentaries, or any message a sender wants to
convey to as many recipients as possible across the Internet. Often,
senders relay UCE through well-known, trusted servers on the Internet to
make messages appear as though they originated from a trusted host, or to
make it difficult to determine the origin of the messages.
____________

To overcome it, please refer to the following KB article:

"XCON: NDRs May Result Based on SMTP Configuration"
http://support.microsoft.com/?id=274638

"OL2000: SMTP Relay Blocking Error Sending E-mail"
http://support.microsoft.com/?id=214402

"SMTP Clients Receive Relaying Prohibited Error Message When Authenticated
Relay Is Enabled"
http://support.microsoft.com/?id=295164

"Misleading NDR When Sending to Remote Domain That Does Not Allow Relay"
http://support.microsoft.com/?id=262354

Hope that helps.

Best regards,
Yanhong Huang
Microsoft Community Support

Get Secure! C www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Jul 19 '05 #5

P: n/a
Thank you everyone for your replies. After doing a little more
investigation, I have decided to use aspEmail, which is supported by my
webhost and seems far more reliable and easier than CDONTS or CDOSYS.
I managed to get it working fairly quickly.

Thanks again.
--
Owen.
Jul 19 '05 #6

P: n/a
Hi Owen,

Thanks very much for your update. I am glad to hear that you have found a
workaround.

If there are any more questions on asp programming, please feel free to
post in the group. :)

Best regards,
Yanhong Huang
Microsoft Community Support

Get Secure! C www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Jul 19 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.