Hello,
I have a form in html that I am trying to email the contents to a location using an asp page. I have included the code for the form and the asp page below. When I exectue this I am getting an http 500 internal error. Please take a look and let me know your thoughts.
Jeff
Form ***
<form id="client_email" action="contact.asp" method="GET">
<tr>
<td class="user main" bgcolor="#eeeeee" background="img/spacer.gif">
<div><div align="right"><font size="2">Full name:</font><!--"''"--></div></div>
</td>
<td class="user main" bgcolor="#FFFFFF" background="img/spacer.gif" TlxField="area1" align="left" valign="middle">
<div>
<!--fe --><input type="text" name="client_name" value="" maxlength="200" size="30">
<!--/fe --></div>
</td>
</tr>
<tr>
<td class="user main" bgcolor="#eeeeee" background="img/spacer.gif">
<div><DIV align=right><FONT size=2>Email address:</FONT><!--"''"--></DIV></div>
</td>
<td class="user main" bgcolor="#FFFFFF" background="img/spacer.gif">
<div>
<!--fe --><input type="text" name="client_senderemail" value="" maxlength="200" size="30">
<!--/fe --></div>
</td>
</tr>
<tr>
<td class="user main" bgcolor="#eeeeee" background="img/spacer.gif">
<div><DIV align=right><FONT size=2>Comment or question:</FONT><!--"''"--></DIV></div>
</td>
<td class="user main" bgcolor="#FFFFFF" background="img/spacer.gif">
<div>
<!--fe --><textarea name="client_message" cols="30" rows="5"></textarea>
<!--/fe --></div>
</td>
</tr>
<tr>
<td class="user main" bgcolor="#eeeeee" background="img/spacer.gif">
<div><DIV align=right><FONT size=2>What is the best way to contact you?</FONT><!--"''"--></DIV></div>
</td>
<td class="user main" bgcolor="#FFFFFF" background="img/spacer.gif">
<div>
<!--fe --><input type="radio" name="client_contactway" value="email"><font size="2">By email</font>
<!--/fe --></div>
<div>
<!--fe --><input type="radio" name="client_contactway" value="phone"><font size="2">By phone</font>
<!--/fe --></div>
</td>
</tr>
<tr>
<td class="user main" bgcolor="#eeeeee" background="img/spacer.gif">
<div><DIV align=right><FONT size=2>If by phone, what is the best time of day to get in touch with you?</FONT><!--"''"--></DIV></div>
</td>
<td class="user main" bgcolor="#FFFFFF" background="img/spacer.gif">
<div>
<!--fe --><textarea name="client_contacttime" cols="30" rows="5"></textarea>
<!--/fe --></div>
</td>
</tr>
<tr>
<td class="user main" bgcolor="#eeeeee" background="img/spacer.gif" align="center" valign="middle"> </td>
<td class="user main" bgcolor="#FFFFFF" background="img/spacer.gif" align="center" valign="middle">
<div>
<!--fe --><input type="image" src="img/submit_white.gif" name="submit" value="Submit">
<!--/fe --></div>
</td>
</tr>
</form>
Asp contact code
<%
Dim ObjSendMail
Dim iConf
Dim Flds
set reg = New RegExp
reg.Pattern = "^[A-Za-z0-9\._\-]+@([A-Za-z0-9\._\-]+\.)+[A-Za-z0-9\._\-]+$"
set m = reg.Execute(Request.QueryString("client_email"))
name = Request.QueryString("client_name")
senderemail = Request.QueryString("client_senderemail")
message = Request.QueryString("client_message")
contactway = Request.QueryString("client_contactway")
contacttime = Request.QueryString("client_contacttime")
Set ObjSendMail = Server.CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
Flds(" = 1
'**** Path below may need to be changed if it is not correct
Flds(" = "c:\inetpub\mailroot\pickup"
Flds.Update
Set ObjSendMail.Configuration = iConf
ObjSendMail.To = "webmaster@jwcsconsultingservice.com"
ObjSendMail.Subject = "A message from your Contacts Page from " & name &
ObjSendMail.From = "contactform@junkcarsfl.com"
' we are sending a text email.. simply switch the comments around to send an html email instead
'ObjSendMail.HTMLBody = "<html><head><title>Contact Letter</title></head><body><br>" & street & & city & & state & & zip & & name & & senderemail & & message & & contactway & & contacttime & "</body></html>"
ObjSendMail.TextBody = "this is the body"
ObjSendMail.Send
Response.Write("Your email was sent")
Set ObjSendMail = Nothing
%>
I have a form in html that I am trying to email the contents to a location using an asp page. I have included the code for the form and the asp page below. When I exectue this I am getting an http 500 internal error. Please take a look and let me know your thoughts.
Jeff
Form ***
<form id="client_email" action="contact.asp" method="GET">
<tr>
<td class="user main" bgcolor="#eeeeee" background="img/spacer.gif">
<div><div align="right"><font size="2">Full name:</font><!--"''"--></div></div>
</td>
<td class="user main" bgcolor="#FFFFFF" background="img/spacer.gif" TlxField="area1" align="left" valign="middle">
<div>
<!--fe --><input type="text" name="client_name" value="" maxlength="200" size="30">
<!--/fe --></div>
</td>
</tr>
<tr>
<td class="user main" bgcolor="#eeeeee" background="img/spacer.gif">
<div><DIV align=right><FONT size=2>Email address:</FONT><!--"''"--></DIV></div>
</td>
<td class="user main" bgcolor="#FFFFFF" background="img/spacer.gif">
<div>
<!--fe --><input type="text" name="client_senderemail" value="" maxlength="200" size="30">
<!--/fe --></div>
</td>
</tr>
<tr>
<td class="user main" bgcolor="#eeeeee" background="img/spacer.gif">
<div><DIV align=right><FONT size=2>Comment or question:</FONT><!--"''"--></DIV></div>
</td>
<td class="user main" bgcolor="#FFFFFF" background="img/spacer.gif">
<div>
<!--fe --><textarea name="client_message" cols="30" rows="5"></textarea>
<!--/fe --></div>
</td>
</tr>
<tr>
<td class="user main" bgcolor="#eeeeee" background="img/spacer.gif">
<div><DIV align=right><FONT size=2>What is the best way to contact you?</FONT><!--"''"--></DIV></div>
</td>
<td class="user main" bgcolor="#FFFFFF" background="img/spacer.gif">
<div>
<!--fe --><input type="radio" name="client_contactway" value="email"><font size="2">By email</font>
<!--/fe --></div>
<div>
<!--fe --><input type="radio" name="client_contactway" value="phone"><font size="2">By phone</font>
<!--/fe --></div>
</td>
</tr>
<tr>
<td class="user main" bgcolor="#eeeeee" background="img/spacer.gif">
<div><DIV align=right><FONT size=2>If by phone, what is the best time of day to get in touch with you?</FONT><!--"''"--></DIV></div>
</td>
<td class="user main" bgcolor="#FFFFFF" background="img/spacer.gif">
<div>
<!--fe --><textarea name="client_contacttime" cols="30" rows="5"></textarea>
<!--/fe --></div>
</td>
</tr>
<tr>
<td class="user main" bgcolor="#eeeeee" background="img/spacer.gif" align="center" valign="middle"> </td>
<td class="user main" bgcolor="#FFFFFF" background="img/spacer.gif" align="center" valign="middle">
<div>
<!--fe --><input type="image" src="img/submit_white.gif" name="submit" value="Submit">
<!--/fe --></div>
</td>
</tr>
</form>
Asp contact code
<%
Dim ObjSendMail
Dim iConf
Dim Flds
set reg = New RegExp
reg.Pattern = "^[A-Za-z0-9\._\-]+@([A-Za-z0-9\._\-]+\.)+[A-Za-z0-9\._\-]+$"
set m = reg.Execute(Request.QueryString("client_email"))
name = Request.QueryString("client_name")
senderemail = Request.QueryString("client_senderemail")
message = Request.QueryString("client_message")
contactway = Request.QueryString("client_contactway")
contacttime = Request.QueryString("client_contacttime")
Set ObjSendMail = Server.CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
Flds(" = 1
'**** Path below may need to be changed if it is not correct
Flds(" = "c:\inetpub\mailroot\pickup"
Flds.Update
Set ObjSendMail.Configuration = iConf
ObjSendMail.To = "webmaster@jwcsconsultingservice.com"
ObjSendMail.Subject = "A message from your Contacts Page from " & name &
ObjSendMail.From = "contactform@junkcarsfl.com"
' we are sending a text email.. simply switch the comments around to send an html email instead
'ObjSendMail.HTMLBody = "<html><head><title>Contact Letter</title></head><body><br>" & street & & city & & state & & zip & & name & & senderemail & & message & & contactway & & contacttime & "</body></html>"
ObjSendMail.TextBody = "this is the body"
ObjSendMail.Send
Response.Write("Your email was sent")
Set ObjSendMail = Nothing
%>