URGENT PLEASE mailproblem
Hej pls hjælp - sidder her og kan ike komme videre....Jeg har kun ASPmail på webhotellet og kan ikke få vedlagte script til at virke. Får denne fejl:
Microsoft VBScript runtime error \'800a01b6\'
Object doesn\'t support this property or method: \'Mailer.AddRecipient\'
/dev/contactus.asp, line 22
********************************************
Her kommer scriptet:
<!--#include virtual=\"/dev/_db.asp\"-->
<%
bDontCount = False
sPageTitle = \"2eNetWorX - Stats\"
bAdminOnly = False
lSubjectID = 0
sTitleBar = \"/dev :: <a href=\"\"/dev/index.asp\"\">home</a> :: stats\"
sub SendMail(sTo, sSubject, sBody)
\'TO DO: Change the mail configuration
sMailServer = \"mail.chameleon.dk\"
sMailSender = \"lucy@chameleon.dk\"
sMailSenderName = \"Chameleon\"
Set Mailer = Server.CreateObject(\"SMTPsvg.Mailer\")
Mailer.RemoteHost = sMailServer
Mailer.FromAddress = sMailSender
Mailer.FromName = sMailSenderName
Mailer.Subject = sSubject
Mailer.AddRecipient = sTo
Mailer.Body = sBody
end sub
bErr = False
if request(\"cmdSend\") <> \"\" then
sName = request(\"txtName\")
sCompany = request(\"txtCompany\")
sEmail = request(\"txtEmail\")
sComments = request(\"txtComments\")
if sName = \"\" then
sErr = \"Please specify your name.\"
bErr = True
end if
if len(sEmail) < 6 then
sErr = \"Please specify a correct email.\"
bErr = True
end if
if (instr(sEmail, \"@\") = 0) or (instr(sEmail,\".\")=0) then
sErr = \"Please specify a correct email.\"
bErr = True
end if
if not bErr then
\'TO DO: Change the email
sContactEmail = \"lucy@chameleon.dk\"
sSubject = \"Contact Request\"
sBody = \"Name : \" & sName & vbCrLf
sBody = sBody & \"Company : \" & sCompany & vbCrLf
sBody = sBody & \"Email : \" & sEmail & vbCrLf
sBody = sBody & \"Comments : \" & vbCrLf
sBody = sBody & sComments & vbcrlf & vbcrlf
sBody = sBody & \"Date/Time: \" & now & vbcrlf & vbcrlf
sBody = sBody & \"User :\" & session(\"devUserName\") & vbcrlf & vbcrlf
sBody = sBody & \"Session :\" & session.SessionID & vbcrlf & vbcrlf
sBody = sBody & \"Remote IP : \" & request.servervariables(\"remote_addr\")
SendMail sContactEmail, sSubject, sBody
%>
<!--#include virtual=\"/dev/_header.asp\"-->
<br><br>
<p class=\"smallerheader\">
Thank you, <br><br>
Your email has been sent.
</p>
<p class=\"smallertext\">
You may go back to the <a href=\"/dev/index.asp\">main page</a> now.
</p>
<!--#include virtual=\"/dev/_footer.asp\"-->
<%
response.end
end if
end if
%>
<!--#include virtual=\"/dev/_header.asp\"-->
<br>
<p class=\"smallheader\">
2eNetWorX/dev :: Contact Us
</p>
<p class=\"smallerheader\">
How to contact us
</p>
<p class=\"smallertext\">
If you have questions, recommendations or bug reports about the site,
please use
\"<a href=\"projects/question.asp?pid=1\">ask a question</a>\",
\"<a href=\"projects/recommend.asp?pid=1\">recommend a feature</a>\" or
\"<a href=\"projects/reporbug.asp?pid=1\">report a bug</a>\"
feedback tools.
<br><br><br>
You may fill out the form below to send us an email;
<p class=\"smallerheader\">
<%=sErr%>
</p>
<form action=\"contactus.asp?send=1\" method=\"post\">
<table border=0>
<tr>
<td class=\"smallerheader\">Your Name</td>
<td><input type=\"text\" name=\"txtName\" class=\"tbflat\" value=\"<%=sName%>\"></td>
</tr>
<tr>
<td class=\"smallerheader\">Company</td>
<td><input type=\"text\" name=\"txtCompany\" class=\"tbflat\" value=\"<%=sCompany%>\"></td>
</tr>
<tr>
<td class=\"smallerheader\">Email</td>
<td><input type=\"text\" name=\"txtEmail\" class=\"tbflat\" value=\"<%=sEmail%>\"></td>
</tr>
<tr>
<td class=\"smallerheader\">Comments</td>
<td><textarea cols=40 rows=5 name=\"txtComments\" class=\"tbflat\"><%=sComments%></textarea></td>
</tr>
<tr>
<td></td>
<td><input type=\"submit\" name=\"cmdSend\" value=\" Send \" class=\"cmdflat\"></td>
</tr>
</table>
</form>
<br><br>
<!--#include virtual=\"/dev/_footer.asp\"-->
