473,396 Members | 1,918 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,396 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 9185
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...

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.