473,398 Members | 2,427 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

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

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
6 9187
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: CK | last post by:
Hi all, I know this question is stupid. But i need some advice for this. I am trying to develop a website, which will allow the user send to order form to the admin email. I am planning to use the...
10
by: I_love_php | last post by:
What is the best way to send one email to 9000 users without them getting it in Junk mail ? Please help me with ur ideas
6
by: John J. Hughes II | last post by:
I have a service that needs to send e-mail alerts. I have been attempting to use the System.Net.Mail function from .NET but this seems to require the IIS be installed and running. Since some of...
2
by: Leonard | last post by:
I am using SmtpMail on a couple of ASP.NET pages. When mail is sent to an address outside the domain I get the "Could not access 'CDO.Message' object." error message. I have looked in the...
10
by: Max | last post by:
Hi, I am newbie developing a MailList program in asp.net c#. To avoid be considered as a span, a would like to process some messages, stops, process some messages, stops...... What do you...
6
by: JIM.H. | last post by:
Hello, I am using SmtpMail.Send() and I get the following message The server rejected one or more recipient addresses. The server response was: 550 5.7.1 Unable to relay for myMail@hotmail.com...
3
by: Nathan Sokalski | last post by:
I have an ASP.NET page that sends a Mail.MailMessage to several email addresses (all mine). However, one of the addresses, the one ending in @verizon.net, does not seem to be recieving the message...
10
by: Logipro | last post by:
Hi, Can it's possible to send a local Web page (HTML) (with pictures) by Outlook, OE, MAPI or Jmail, simply by pass a Html path files ? I try many many tips like replace "cid:" before image in...
2
by: xx75vulcan | last post by:
Howdy, I have successfully setup my php.ini file on a web server to communicate with my Microsoft Exchange Mail server, and can test the ability to send mail using the mail() function to...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.