Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > CDO error 8004020f

Reply
Thread Tools

CDO error 8004020f

 
 
alex
Guest
Posts: n/a
 
      10-03-2003
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.CreateObject("CDO.Message")

Dim iConf
Set iConf = CreateObject("CDO.Configuration")
Dim Flds
Set Flds = iConf.Fields
Flds("http://schemas.microsoft.com/cdo/configuration/Sendusing") = 2
Flds("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
"11.11.111.11" 'real IP actually used
Flds("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25

Flds.Update

Set msg.Configuration = iConf
'Works on my machine, but fails on the server.
msg.To = "(E-Mail Removed)"
msg.From = "(E-Mail Removed)"
msg.Subject = "Test - " & now()
msg.TextBody = "Test message - " & now()
msg.Send

set msg = nothing


 
Reply With Quote
 
 
 
 
Ray at
Guest
Posts: n/a
 
      10-03-2003
And what is the description of this 8004020f error?

Does IUSR have permissions to write files to \inetpub\mailroot\pickup?

Ray at work

"alex" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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.CreateObject("CDO.Message")
>
> Dim iConf
> Set iConf = CreateObject("CDO.Configuration")
> Dim Flds
> Set Flds = iConf.Fields
> Flds("http://schemas.microsoft.com/cdo/configuration/Sendusing") = 2
> Flds("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
> "11.11.111.11" 'real IP actually used
> Flds("http://schemas.microsoft.com/cdo/configuration/smtpserverport") =

25
>
> Flds.Update
>
> Set msg.Configuration = iConf
> 'Works on my machine, but fails on the server.
> msg.To = "(E-Mail Removed)"
> msg.From = "(E-Mail Removed)"
> msg.Subject = "Test - " & now()
> msg.TextBody = "Test message - " & now()
> msg.Send
>
> set msg = nothing
>
>



 
Reply With Quote
 
 
 
 
alex
Guest
Posts: n/a
 
      10-03-2003
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:(E-Mail Removed)...
> And what is the description of this 8004020f error?
>
> Does IUSR have permissions to write files to \inetpub\mailroot\pickup?
>
> Ray at work
>
> "alex" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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.CreateObject("CDO.Message")
> >
> > Dim iConf
> > Set iConf = CreateObject("CDO.Configuration")
> > Dim Flds
> > Set Flds = iConf.Fields
> > Flds("http://schemas.microsoft.com/cdo/configuration/Sendusing") = 2
> > Flds("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
> > "11.11.111.11" 'real IP actually used
> > Flds("http://schemas.microsoft.com/cdo/configuration/smtpserverport") =

> 25
> >
> > Flds.Update
> >
> > Set msg.Configuration = iConf
> > 'Works on my machine, but fails on the server.
> > msg.To = "(E-Mail Removed)"
> > msg.From = "(E-Mail Removed)"
> > msg.Subject = "Test - " & now()
> > msg.TextBody = "Test message - " & now()
> > msg.Send
> >
> > set msg = nothing
> >
> >

>
>



 
Reply With Quote
 
Ray at
Guest
Posts: n/a
 
      10-03-2003
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>



 
Reply With Quote
 
alex
Guest
Posts: n/a
 
      10-03-2003
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:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
error '8004020f' ASP Programming help w/ SMTP Paco ASP General 4 03-30-2005 05:31 PM
error 8004020F gariboldo ASP General 0 02-02-2005 10:07 PM
8004020F error with CDO.Message Luis andyza@webmail.co.za ASP General 1 07-27-2004 11:47 AM
Help! CDO.Send returns error '8004020f' -- why??? Owen ASP General 6 02-20-2004 03:12 AM
just error 8004020f vvv ASP General 1 11-05-2003 07:02 PM



Advertisments