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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Send an E-mail message from an ASP page 1

Status
Not open for further replies.

bstlouis

Technical User
Sep 23, 2004
3
US
I am trying to send a simple message from a page once the web visitor has completed a registration form. I have no trouble getting the data into the database, however I can't get past the "error '800a0046', Permission Denied" error. My code is below:

<%
dim objMail
set objMail = Server.CreateObject("CDONTS.Newmail") ' I have also tried ("CDO.Messsage")

objMail.From = "me@anydotcom.com"
objMail.To = "anyone@anotherdotcom.com"
objMail.Subject = "Sending Email with ASP using CDONTS"
objMail.Body = "Please disregard this email. It is only a test."
objMail.Send

%>

I've read other posts on this forum and on others, like 4guysfromrolla, and I don't know what it is I need to do to get permissions granted. Can anyone please let me know what I need to do to get this accomplished? Is it my web hosting company? What exactly do I need to tell them to allow me to do this? Do I need my own e-mail setup to do this?
Any and all help is appreciated. Many thanks and best regards.
 
You probably want to use CDO.Messsage because unless the web server is quite old, it likely doesn't support CDONTS.Newmail.

Since you mentioned a hosting company, the first thing I would do is check the company's FAQ pages because some hosting companies provide alternate methods.
 
Thanks, Sheco. I'll check that out. I'm pretty sure that they support CDO because I tried the test found with on another thread for other email possibilities and none of them worked except CDO. It just won't let me get past the .send command. Any thoughts?
 
Most SMTP servers now need authentication on and a username and password sent to try and prevent spam. Check with your ISP or SMTP admin

___________________________________________________________
If you want the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
Steam Engine Prints
 
Really you need to check with the hosting company... my first guess is that the default IUSR_ServerName account or whatever default account they have for your web site does not have read/write/delete permissions to the \inetpub\mailroot folder.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top