Link to home
Start Free TrialLog in
Avatar of MKorostin
MKorostin

asked on

Send email from ASP page - Permission denied error

I need to enter information on html page and on Submit button send an email. There are 2 lines of code that send email from ASP:

Set objMailMessage=Server.CreateObject("CDONTS.NewMail")
Call objMailMessage.Send(strFromContactEMailAddress, strToEMailAddress, strSubject, strBody)

But I am getting error that handled by my error handler:
Error occurred while processing your request
Error Number: 70
Error Description: Permission denied

When I comment out the second line that actually sends email, I do not have any errors, so I assume that CDONTS included into Windows 2000 and I can create object with no problems. So the error I get on the second line -Send. What kind of permission is it?

Thank you for any idea.
     
ASKER CERTIFIED SOLUTION
Avatar of lgdo
lgdo

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gladxml
gladxml

MKorostin,

Try to check out the link might help...

http://www.4guysfromrolla.com/webtech/faq/Email/faq2.shtml

http://www.4guysfromrolla.com/webtech/faq/Email/faq1.shtml

Try something like this... from the link above

<%
  Dim objMail
  Set objMail = Server.CreateObject("CDONTS.NewMail")
 
     objMail.From = "rob@tconsult.com"
     objMail.Subject = "How TO send email with CDONTS"
     objMail.To = "someone@someplace.com"
     objMail.Body = "This is an email message" & vbcrlf&_
     "with CDONTS." & vbcrlf&_
     "It is really easy. " 
     objMail.Send
 
 Response.write("Mail was Sent")
 
 'You must always do this with CDONTS.
  set objMail = nothing
%>



u need to define SMTP server u r using to send message
may be u dont have privilege with the default server ur application is using

just check it out
Avatar of MKorostin

ASKER

Thank you very much.