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

O

Owen

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 = "(e-mail address removed)" ' (binarybaby.co.uk is my site domain)
sSender = "(e-mail address removed)"
sSubject = "Test"
sTo = "(e-mail address removed)" ' (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.
 
R

Ray at

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
 
Y

Yan-Hong Huang[MSFT]

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.
 
O

Owen

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.
 
Y

Yan-Hong Huang[MSFT]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top