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.Crea teObject(" CDONTS.New Mail")
Call objMailMessage.Send(strFro mContactEM ailAddress , 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.
Set objMailMessage=Server.Crea
Call objMailMessage.Send(strFro
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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
may be u dont have privilege with the default server ur application is using
just check it out
ASKER
Thank you very much.
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("CDONT
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
%>