[tt]I have this form that is suppossed to send an email after submitting it but it's not working. the "Thank you for your comment! An email has been sent to you." is displayed after submitting, but no email is delivered and I don't see the problem nor do I get an error.
[tt]
Here's my code
<%@language = vbscript%>
<%option explicit%>
<%
dim name, email, query
name = request.form("name"
email = request.form("email"
query = request.form("query"
if (name <> "" and email <> "" and query <> ""
then
dim objmail, recipients
set objmail = server.createobject("cdonts.newmail"
objmail.from = "WebMaster@MyCompany.com"
objmail.to = email
objmail.subject = "Your Inquiry" & name
recipients = array("me@mycompany.com", _
"me@mycompany.com"
objmail.bcc = Join(recipients, ";"
objmail.body = query
objmail.send
response.write "Thank you for your comment! An email has been sent to you."
set objmail = nothing
else
%>
[tt]And here's the form:
<FORM name="form1" method="post" action="<%=request.servervariables("script_name"
%>">
<P>Name
<INPUT type="text" name="name" size="40">
</P>
<P>Email
<INPUT type="text" name="email" size="40">
</P>
<P>Query/Questions
<textarea name="query" cols=40 rows=10></textarea>
</P>
<P>
<input type=submit value="submit">
</P>
</FORM>
[/tt]
[tt]
Here's my code
<%@language = vbscript%>
<%option explicit%>
<%
dim name, email, query
name = request.form("name"
email = request.form("email"
query = request.form("query"
if (name <> "" and email <> "" and query <> ""
dim objmail, recipients
set objmail = server.createobject("cdonts.newmail"
objmail.from = "WebMaster@MyCompany.com"
objmail.to = email
objmail.subject = "Your Inquiry" & name
recipients = array("me@mycompany.com", _
"me@mycompany.com"
objmail.bcc = Join(recipients, ";"
objmail.body = query
objmail.send
response.write "Thank you for your comment! An email has been sent to you."
set objmail = nothing
else
%>
[tt]And here's the form:
<FORM name="form1" method="post" action="<%=request.servervariables("script_name"
<P>Name
<INPUT type="text" name="name" size="40">
</P>
<P>Email
<INPUT type="text" name="email" size="40">
</P>
<P>Query/Questions
<textarea name="query" cols=40 rows=10></textarea>
</P>
<P>
<input type=submit value="submit">
</P>
</FORM>
[/tt]
[tt]"A Successful man is one who can build a firm foundation with the bricks that others throw at him"[/tt]
![[noevil] [noevil] [noevil]](/data/assets/smilies/noevil.gif)
![[noevil] [noevil] [noevil]](/data/assets/smilies/noevil.gif)