473,543 Members | 2,320 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

CDO error 8004020f

Hi,

Does anybody have an idea why is this happening. The following code works
great on my development machine (windows 2000 pro), but on the test server
(Windows 2000 Server) it can only send emails to addresses on our domain. If
I specify other address I just get a 8004020f error message. The smtp server
I'm trying to send is on a separate machine (Windows NT Server).
I think it has something to do with web server configuration, or even maybe
smtp server? But the fact that I can send it from my machine throws me
off... I also tried a Perl script to send email using the same smtp server
and I have the same problem, works from my machine, fails on test server.
Anyone came across something like that?

Thanks,
Alex

Code follows:

Set msg = Server.CreateOb ject("CDO.Messa ge")

Dim iConf
Set iConf = CreateObject("C DO.Configuratio n")
Dim Flds
Set Flds = iConf.Fields
Flds("http://schemas.microso ft.com/cdo/configuration/Sendusing") = 2
Flds("http://schemas.microso ft.com/cdo/configuration/smtpserver") =
"11.11.111. 11" 'real IP actually used
Flds("http://schemas.microso ft.com/cdo/configuration/smtpserverport" ) = 25

Flds.Update

Set msg.Configurati on = iConf
'Works on my machine, but fails on the server.
msg.To = "us**@outsidedo main.com"
msg.From = "us**@ourdomain .com"
msg.Subject = "Test - " & now()
msg.TextBody = "Test message - " & now()
msg.Send

set msg = nothing
Jul 19 '05 #1
4 40901
And what is the description of this 8004020f error?

Does IUSR have permissions to write files to \inetpub\mailro ot\pickup?

Ray at work

"alex" <al*****@yahoo. com> wrote in message
news:uO******** *****@TK2MSFTNG P10.phx.gbl...
Hi,

Does anybody have an idea why is this happening. The following code works
great on my development machine (windows 2000 pro), but on the test server
(Windows 2000 Server) it can only send emails to addresses on our domain. If I specify other address I just get a 8004020f error message. The smtp server I'm trying to send is on a separate machine (Windows NT Server).
I think it has something to do with web server configuration, or even maybe smtp server? But the fact that I can send it from my machine throws me
off... I also tried a Perl script to send email using the same smtp server
and I have the same problem, works from my machine, fails on test server.
Anyone came across something like that?

Thanks,
Alex

Code follows:

Set msg = Server.CreateOb ject("CDO.Messa ge")

Dim iConf
Set iConf = CreateObject("C DO.Configuratio n")
Dim Flds
Set Flds = iConf.Fields
Flds("http://schemas.microso ft.com/cdo/configuration/Sendusing") = 2
Flds("http://schemas.microso ft.com/cdo/configuration/smtpserver") =
"11.11.111. 11" 'real IP actually used
Flds("http://schemas.microso ft.com/cdo/configuration/smtpserverport" ) = 25
Flds.Update

Set msg.Configurati on = iConf
'Works on my machine, but fails on the server.
msg.To = "us**@outsidedo main.com"
msg.From = "us**@ourdomain .com"
msg.Subject = "Test - " & now()
msg.TextBody = "Test message - " & now()
msg.Send

set msg = nothing

Jul 19 '05 #2
Thanks for the reply. It doesn't actually give me an error description just:
error '8004020f'
/mailtest.asp, line 42

The smtp server is not the default smtp server on the web server, but i
specify the IP address of a different SMTP server (on separate machine). So
i don't think it event uses those directories. And i can send it to emails
on our domain, but not to email on other domains.

I forgot to mention that the SMTP server is Eudora WorldMail on windows nt
server. But CDO should work with any SMTP server... and it sucessfully sends
emails to my domain...

Thanks,
alex

"Ray at <%=sLocation% >" <myfirstname at lane34 dot com> wrote in message
news:eh******** ******@TK2MSFTN GP12.phx.gbl...
And what is the description of this 8004020f error?

Does IUSR have permissions to write files to \inetpub\mailro ot\pickup?

Ray at work

"alex" <al*****@yahoo. com> wrote in message
news:uO******** *****@TK2MSFTNG P10.phx.gbl...
Hi,

Does anybody have an idea why is this happening. The following code works great on my development machine (windows 2000 pro), but on the test server (Windows 2000 Server) it can only send emails to addresses on our domain.
If
I specify other address I just get a 8004020f error message. The smtp

server
I'm trying to send is on a separate machine (Windows NT Server).
I think it has something to do with web server configuration, or even

maybe
smtp server? But the fact that I can send it from my machine throws me
off... I also tried a Perl script to send email using the same smtp

server and I have the same problem, works from my machine, fails on test server. Anyone came across something like that?

Thanks,
Alex

Code follows:

Set msg = Server.CreateOb ject("CDO.Messa ge")

Dim iConf
Set iConf = CreateObject("C DO.Configuratio n")
Dim Flds
Set Flds = iConf.Fields
Flds("http://schemas.microso ft.com/cdo/configuration/Sendusing") = 2
Flds("http://schemas.microso ft.com/cdo/configuration/smtpserver") =
"11.11.111. 11" 'real IP actually used
Flds("http://schemas.microso ft.com/cdo/configuration/smtpserverport" ) =

25

Flds.Update

Set msg.Configurati on = iConf
'Works on my machine, but fails on the server.
msg.To = "us**@outsidedo main.com"
msg.From = "us**@ourdomain .com"
msg.Subject = "Test - " & now()
msg.TextBody = "Test message - " & now()
msg.Send

set msg = nothing


Jul 19 '05 #3
It sounds like a SMTP relaying permissions problem. Does your SMTP server
allow relaying to other domains of e-mails that originate from your IIS
server's IP?

Ray at work

"alex" <al*****@yahoo. com> wrote in message
news:us******** ******@TK2MSFTN GP09.phx.gbl...
Thanks for the reply. It doesn't actually give me an error description just: error '8004020f'
/mailtest.asp, line 42

The smtp server is not the default smtp server on the web server, but i
specify the IP address of a different SMTP server (on separate machine). So i don't think it event uses those directories. And i can send it to emails
on our domain, but not to email on other domains.

I forgot to mention that the SMTP server is Eudora WorldMail on windows nt
server. But CDO should work with any SMTP server... and it sucessfully sends emails to my domain...

Thanks,
alex

Jul 19 '05 #4
Thanks Ray,

Relaying was the problem. My machine goes through a proxy server and the
proxy's IP address was on the allowed list for relaying, that's why it
worked on my machine. After we added web server IP address to allow list, it
works as expected.

Thanks!

"Ray at <%=sLocation% >" <myfirstname at lane34 dot com> wrote in message
news:uu******** ******@TK2MSFTN GP10.phx.gbl...
It sounds like a SMTP relaying permissions problem. Does your SMTP server
allow relaying to other domains of e-mails that originate from your IIS
server's IP?

Ray at work

"alex" <al*****@yahoo. com> wrote in message
news:us******** ******@TK2MSFTN GP09.phx.gbl...
Thanks for the reply. It doesn't actually give me an error description

just:
error '8004020f'
/mailtest.asp, line 42

The smtp server is not the default smtp server on the web server, but i
specify the IP address of a different SMTP server (on separate machine).

So
i don't think it event uses those directories. And i can send it to emails on our domain, but not to email on other domains.

I forgot to mention that the SMTP server is Eudora WorldMail on windows nt server. But CDO should work with any SMTP server... and it sucessfully

sends
emails to my domain...

Thanks,
alex


Jul 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
3254
by: Paco | last post by:
I'm having a problem with an ASP page I've made and was hoping someone out there can help. My page sends an email using CDO to a username pulled from a database as follows: With cdoMessage Set .Configuration = cdoConfig .From = "Admin <admin@MyCompany.com>" .To = rs("USERName") & "@MyCompany.com"
6
15575
by: Owen | last post by:
Hi, can somebody help me please... I'm trying to set up a very simple asp page that sends me an email when it runs. This is just to try and get CDOSYS working so I can send out emails from my website. Everything is fine right up until I execute the ".Send" method. What could be wrong? What does the error mean? The output from the...
1
4480
by: Luis andyza | last post by:
I use CDO.Message to send e-mail from an asp page (similar to the method at http://www.aspfaq.com/show.asp?id=2305). One of my testers entered an invalid e-mail address and got an 8004020F error. Is there a way to trap this error so that I can display a better error message to the user and prevent the page from crashing?
0
1488
by: gariboldo | last post by:
Have all a nice day, I have the following problem: I have in my site a page ASP that contains a form and i'm trying to send it to an email address with the following script: Set cdoConfig = CreateObject("CDO.Configuration") With cdoConfig.Fields .Item(cdoSendUsingMethod) = cdoSendUsingPort .Item(cdoSMTPServer) = "mail.server"
2
6539
by: Mario Michela | last post by:
i've been working for 4 days trying to accomplish something that should take 20 minutes.. I have an asp page that take user info, ie name, address phone, email. it sends a copy to email addres A and sends a reciept to site visitor. i have it working on 1 SBS 2003, but i get Error 8004020f on a second client's machine.. i'm using cdo,...
0
3437
by: Larry D | last post by:
I have a client with a site that users can register at, we collect their emails, if they have one, in an Access db. I have a page that uses CDOSYS to send messages to those emails but I am getting "error '8004020f" when I do this. About 75% of the members have emails so some email fields in the db are empty. One issue with my webhost is that I...
2
2260
by: candywang | last post by:
first , my english is bad~~~I'm sorry! I got some problem. Flds("http://schemas.microsoft.com/cdo/configuration/smtpserver") =real ip(remote machine) Flds("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 Flds("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25...
2
2010
by: gduggan | last post by:
I hope someone can help me solve this problem. I have a client who is hosting their website on an Exchange server running Windows Server 2003 OS. They are currently unable to receive email from clients through the "Contact Us" form and their client gets the following error message in the browser: error '8004020f' ...
7
5582
by: ayush patel | last post by:
Hi everyone, I am writing ASP code to send email using SMTP.I am getting error '8004020f' at .Send. this seems to be a common error. my SMTP server relays to anonymous email addresses.there is no firewall or proxy set up that can stop these mails to be sent. Infact i have seen the SMTP LOG FILE and (i dont know exactly what it says)i...
0
7397
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7582
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7726
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7329
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5257
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3385
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1809
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
948
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
626
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.