Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form to Email problems

Status
Not open for further replies.

beckiehawk

Technical User
Jun 29, 2004
1
US
First of all, I am new to ASP, so please bear with me. I'm trying to make a form that sends to my email. When I submit the form I get the following error code...

Microsoft VBScript runtime error '800a0046'
Permission denied
/customer_resources/formmail.asp, line 411

The part of the code that seems to be giving me trouble is (I put the line numbers in there, that's not in the code)...

402 if mailComp = "CDONTS" then
403 set mailObj = Server.CreateObject("CDONTS.NewMail")
404 mailObj.BodyFormat = 0
405 mailObj.MailFormat = 0
406 mailObj.From = fromAddr
407 mailObj.Value("Reply-To") = replyTo
408 mailObj.To = recipients
409 mailObj.Subject = subject
410 mailObj.Body = body
411 mailObj.Send
412 set mailObj = Nothing
413 exit function
414 end if

Particularly the mailObj.Send. When I take this line out of the code, I get a really nice page with a table on it that contains all the information the client has filled out from the form.

BUT, of course, it doesn't go to my email if I take the mailObj.Send line out. Can someone tell me what I'm doing wrong and how to fix it? You can see the entire code for this page at


Beckie
 
Depending on the security settings on the Web server you may receive a permission denied error when executing the Send method. If this is the case check to make sure that the IUSR_MachineName has Full Control permissions on the mail root directories (usually C:\InetPub\mailroot\). (For example, if your Web server's name is Bob, ensure that IUSR_Bob has these permissions.)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top