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

Sending Email from ASP using CDONTS

Status
Not open for further replies.

Bipasha

Programmer
Feb 28, 2001
23
US
This is the code that i've written:

Set objUN = objDB.Execute("Select * from users where useremail ='" & request("email") & "'")

If request("username") = "Get Username" then
If not objUN.EOF then
Set objSendMail = CreateObject("CDONTS.NewMail")
With objSendMail
.From = "my email address"
.To = request("email")
.Subject = "username"
.Body = objUN("username")
.Send
End With
End If
End If

I keep getting the error "Permission Denied" when i excute this code. Can anyone point out whats wrong in this code or any other method to send emails from ASP??
 
The most probable cause is that your virtual server/directory is running in its own memory space.

You need to uncheck the 'Run inSeperate Memeory Space' box on the properties of that serever.
The other option is to do a metabase hack which is unadvisable as it opens up security holes.

Hope this helps,

James :) James Culshaw
jculshaw@active-data-solutions.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top