'800a0046' Permission denied error with ASP sendmail script

J

Jason

it works from my logon (domain admin account), but everyone else gets

Microsoft VBSCript runtime error '800a0046' Permission denied
path/patj/script.asp line 16

I looked at a lot of articles and gave the IIS accounts full access to
the mailroot folder, along with the 'regular' domain user account I am
using to test... still no good.
also to the directory in which the script(s) reside
Anyone have a definitive answer on the permissions need to run these
scripts?

We started having this problem after I migrated to Windows 2003
Server/IIS 6

Thanks in Advance

-J
 
J

J L

It was a sample script from Microsoft.

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>CDONTS test email asp (out of process ).</title>
</head>

<body>
<%

Set objMail = Server.CreateObject("CDONTS.NewMail")
objMail.From = "(e-mail address removed)"
objMail.To = "(e-mail address removed)"
objMail.Subject="Test Email"
objMail.Body = "Test Email"
objMail.Send
Set objMail = nothing
%>

<p><strong>Your mail has been sent. </strong></p>

</body>
</html><BR/>
Try to run the asp and all the steps above and you will receive the
permission denied
 
C

Curt_C [MVP]

J said:
It was a sample script from Microsoft.

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>CDONTS test email asp (out of process ).</title>
</head>

<body>
<%

Set objMail = Server.CreateObject("CDONTS.NewMail")
objMail.From = "(e-mail address removed)"
objMail.To = "(e-mail address removed)"
objMail.Subject="Test Email"
objMail.Body = "Test Email"
objMail.Send
Set objMail = nothing
%>

<p><strong>Your mail has been sent. </strong></p>

</body>
</html><BR/>
Try to run the asp and all the steps above and you will receive the
permission denied

Windows 2003 & CDONTS
Do a quick search on that one once...you'll see quickly...
 
R

Ray Costanzo [MVP]

So, what is on line 16? objMail.Send?

Whatever account is processing the script, typically IUSR_machine-name,
needs to have permission to write to C:\Inetpub\mailroot\pickup (default
path, anyway).

Are you running this on a Windows NT server? If not, do not use CDONTS.
That's so 90s and doesn't exist on a 2003 server. Instead, use CDOSYS.
Sample code here: http://www.aspfaq.com/show.asp?id=2026

Ray at work
 
J

J L

my web designer requested the CDONTS.dLL, so i moved it from a w2k
server and registered it (per some MS article)

Why is CDO the move instead of the CFONTS? I think my guy is a little
better versed in coding using the CDONTS

The thing is, the script works if I'm logged on as me. I gave the IIS
accounts full access to all of the mailroot subdirectories...

its a w2003 SP1 server.

-J
 
R

Ray Costanzo [MVP]

J L said:
my web designer requested the CDONTS.dLL, so i moved it from a w2k
server and registered it (per some MS article)

Your designer gets to make such decisions?!

Why is CDO the move instead of the CFONTS? I think my guy is a little
better versed in coding using the CDONTS

I don't know. I guess for the same reason that fuel injection is better
than carburetion.

The thing is, the script works if I'm logged on as me. I gave the IIS
accounts full access to all of the mailroot subdirectories...

Try it with CDO. And when you say you gave IIS permission, what account are
you speaking of, exactly?

Ray at work
 
J

J L

I tried some of those sample CDO scripts, and I keep getting this:
CDO.Message.1 error '80040213'

The transport failed to connect to the server.

/stafftest/Board/Forum/Jason2.asp, line 15

as far as the mailroot directories, I gave the IUSR and the IWAM account
full access.
 
R

Ray Costanzo [MVP]

8| Classic ASP? Can you show your code please? Everything up to about
line 18 or so.

Thanks,

Ray at work
 
J

J L

I took out the actual email addresses, but this is a sample from
Microsofts' site. I also tried the sample codes on that ASP site you
referred me to earlier.

<%
Set objEmail = CreateObject("CDO.Message")
objEmail.From = "emailaddiereplaced here"
objEmail.To = "emailaddiereplaced here"
objEmail.Subject = "Server down"
objEmail.Textbody = "Server1 is no longer accessible over the network."
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = _
"MySMTPHost"
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objEmail.Configuration.Fields.Update
objEmail.Send

%>
 

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,023
Latest member
websitedesig25

Latest Threads

Top