hi allz,
i want to tell u that i search the internet for sending email in my site using asp and any free components like cdo or cdonts as i think, and how to configuration the smtp.
today i use this code ( plrase notice that this code is run successfully on the internet ,but on my site it dosent )
<%
If Len(Request.Form("txtEmail")) > 0 then
Dim objMail
Set objMail = Server.CreateObject("CDONTS.NewMail")
objMail.From = "
[email protected] (4GuysFromRolla.com)"
objMail.Subject = "Email attachment demo"
objMail.AttachFile Server.MapPath("/images/new468x60.gif")
objMail.To = Request.Form("txtEmail")
objMail.Body = "This is a demo on sending an email with an attachment."
objMail.Send
Response.write("
Mail was Sent<p>")
'You should always do this with CDONTS.
set objMail = nothing
End If
%>
<form method="post" id=form1 name=form1>
Enter your email address:<br>
<input type="text" name="txtEmail" value="<%=Request.Form("txtEmail")%>">
<p>
<input type="submit" value="Send me an Email with an Attachment!" id=submit1 name=submit1>
</form>
and when i run the page it gives me the following error:
Server object error 'ASP 0177 : 800401f3'
Server.CreateObject Failed
/asp/testm.asp, line 5
800401f3
so how can i solve this problem and how can i configure the SMTP ?
thanks alot