SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: Mail Form Help

Threaded View

  1. #1
    SitePoint Member
    Join Date
    Sep 2010
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Mail Form Help

    Hey All ...

    I used to use this mail form before ... it used to work without any problems until my host "godaddy" upgraded to II7. Now it only gets a "505 Internal service error" ...

    I don't know anything about programming or debugging, I only know few things about html ... So if anyone can help it's verrrrrrrrry much appreciated ... Thank you in advance ...

    That's the script ...

    Code ASP:
    <tr style="height:10px">
    <td></td>
    </tr>
    <tr>	
    <td>
    <table width="100%" border="0" cellpadding="0" cellspacing="0">
    		<%
    		If request.form("actionIs")<>"" then
    		form_validated=true
    		strEmail = request.form("email")
    		If request.form("name") ="" then
    		msgname = "<tr><td colspan='2' align='left' class='normal_bold_grey_light'>***Please Enter Your Name..</td></tr>"
    		form_validated=false
    		end if
    		If request.form("email")="" or request.form("phone")="" then
    		msgcontact = "<tr><td colspan='2' align='left' class='normal_bold_grey_light'>***Please Enter Contact Info..</td></tr> "
    		form_validated=false
    						end if
    						if strEmail <> "" and inStr(strEmail,"@") = 0 and inStr(strEmail,".") = 0 then
    						'If request.form("email") <> "" and inStr(request.form("email"),"@") <> 0  AND inStr(request.form("email"),".") <> 0 then
    							msgemail = "<tr><td colspan='2' align='left' class='normal_bold_grey_light'>***Please Enter a Valid Email..</td></tr>"
    							form_validated=false
    						end if
    						If request.form("message") ="" then
    						msgmsg = "<tr><td colspan='2' align='left' class='normal_bold_grey_light'>***Please Enter Your Message Here..</td></tr>"
    						form_validated=false
    						end if
    						If request.form("contType") ="" then
    						msgtype = "<tr><td colspan='2' align='left' class='normal_bold_grey_light'>***Please Enter Your Reason Of Contact ..</td></tr>"
    						form_validated=false
    						end if
    						End IF
    						If not form_validated or request.form("actionIs")="" then
    						'response.write "oooooops"
    						'else
    						'response.write "ok"
    						'end if
    						%>
    						<%'If request.form("actionIs")="" then%>
     
    		<form action="<%=request.serverVariables("script_name")%>#contact" method="post" name="contactForm">
     
    <%=msgname%>
    <tr style="height:25px">
    	<td width="170" valign="top" class="normal_bold_green" align="left" style="padding-top:3px">NAME</td>
    	<td class="FP" valign="top" align="left"><input name="name" type="text" class="form" size="35" style="width:540px;background-color:#ffffff;border:1px;border:1 #326431 solid" value="<%=request.form("name")%>" /></td>
    </tr>
     
    <%=msgcontact%>
    <tr style="height:25px">
    	<td valign="top" class="normal_bold_green" align="left" style="padding-top:3px">PHONE/MOBILE</td>
    	<td class="FP" valign="top" align="left"><input name="phone" type="text" class="form" size="35" style="width:540px;background-color:#ffffff;border:1px;border:1 #326431 solid" value="<%=request.form("phone")%>" /></td>
    </tr>
     
    <%=msgemail%>
    <tr style="height:25px">
    	<td valign="top" class="normal_bold_green" align="left" style="padding-top:3px">EMAIL</td>
    	<td class="FP" valign="top" align="left"><input name="email" type="text" class="form" size="35" style="width:540px;background-color:#ffffff;border:1px;border:1 #326431 solid" <%If msgemail="" then%>value="<%=request.form("email")%>"<%End IF%> /></td>
    </tr>
     
    <%=msgtype%>
    <tr style="height:25px">
    	<td valign="top" class="normal_bold_green" align="left" style="padding-top:3px">CONTACT TYPE</td>
    	<td class="FP" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
    <tr>
    	<td align="left" width="50" class="normal_bold_green"><input name="contType" type="radio" value="comment" class="INPUT_none" <%If request.form("contType")="comment" then%>checked<%end if%> />Comment</td>
    	<td align="left" width="50" class="normal_bold_green"><input name="contType" type="radio" value="question" class="INPUT_none" <%If request.form("contType")="question" then%>checked<%end if%> />Question</td>
    <!--</tr>
    <tr>-->
    	<td align="left" width="50" class="normal_bold_green"><input name="contType" type="radio" value="complaint" class="INPUT_none" <%If request.form("contType")="complaint" then%>checked<%end if%> />Complaint</td>
    	<td align="left" width="50" class="normal_bold_green"><input name="contType" type="radio" value="suggestion" class="INPUT_none" <%If request.form("contType")="suggestion" then%>checked<%end if%> />Suggestion</td>
    </tr>
    </table>
    </td>
    </tr>
     
    <%=msgmsg%>
    <tr>
    	<td valign="top" class="normal_bold_green" align="left" style="padding-top:3px">MESSAGE</td>
    	<td class="FP" valign="top" align="left"><textarea name="message" class="textarea" cols="30" rows="5" style="width:540px;background-color:#ffffff;border:1 #326431 solid;overflow:hidden"><%=request.form("message")%></textarea></td>
    </tr>
     
    <tr style="height:5px">
    	<td class="space" colspan="2"></td>
    </tr>
     
    <tr style="height:25px">
    	<td></td>
    	<td align="center" valign="middle" class="FPbold"><input type="submit" name="submit" value="SUBMIT" style="width:100px;background-color:#ffffff;border:1 #326431 solid" /></td>
    </tr>
    <input type="hidden" name="actionIs" value="submitted" />
    </form>
     
    <%else%>
    						<%
    						Set myMail=CreateObject("CDO.Message")
    						myMail.Subject="MBOLAW Form :: "& request.form("contType")
    						myMail.From="website@mbo-law.com"
    						myMail.To="r.gazzar@grafica-egy.com"
    						TheBody = TheBody &"<font face=verdana color=navy size=3><strong>MBOLAW</strong></font>" 
    						TheBody = TheBody &"<font face=verdana color=navy size=2><br />--------------------------------------------"
    						TheBody = TheBody &"<br />This <strong>"&request.form("contType")&"</strong> Was Sent Through <font color=red>MBOLAW Website Feedback Form</font> from:-" 
    						TheBody = TheBody &"<br /><strong>Name    : </strong>"& request.form("name")
    						TheBody = TheBody &"<br /><strong>Phone   : </strong>"& request.form("phone")
    						TheBody = TheBody &"<br /><strong>Email   : </strong>"& request.form("email")
    						TheBody = TheBody &"<br /><strong>Message : </strong>"& request.form("message")
    						TheBody = TheBody &"<br /><strong>Date    </strong>: "& Date()
    						TheBody = TheBody &"<br />------------------------------------------</font>"
    						TheBody = TheBody &"<br /><font face=verdana color=navy size=1>* For Any Comments On The Website Feedback Mails, Please Contact <a href='http://www.grafica-egy.com.com/'>grafica-egy.com</a></font>"
    						myMail.HTMLBody = TheBody
    						With myMail.Configuration.Fields
              					.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
              					.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtpout.secureserver.net"
              					.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "website@mbo-law.com"
              					.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "mail password inserted" 
             		 			.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
              					.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 80
              					.Update
    						End With
    						myMail.Send
    						set myMail=nothing
    						%>
     
     
    <tr style="height:10px">
    							<td class="space" colspan="2"></td>
    						</tr>
    						<tr style="height:20px">
    							<td colspan="2" align="right" class="normal_bold_green">*** Your <%=request.form("contType")%> has been submitted..
    							<br />Thank You...</td>
    						</tr>
    						<tr style="height:20px">
    							<td colspan="2"></td>
    						</tr>
    						<tr>
    							<td width="150" valign="top" class="normal_bold_green" align="left">NAME</td>
    							<td class="normal_bold_grey_light" valign="top" align="left"><%=request.form("name")%></td>
    						</tr>
    						<%=msgcontact%>
    						<tr>
    							<td valign="top" class="normal_bold_green" align="left">PHONE/MOBILE</td>
    							<td class="normal_bold_grey_light" valign="top" align="left"><%=request.form("phone")%></td>
    						</tr>
    						<%=msgemail%>
    						<tr>
    							<td valign="top" class="normal_bold_green" align="left">EMAIL</td>
    							<td class="normal_bold_grey_light" valign="top" align="left"><%=request.form("email")%></td>
    						</tr>
    						<%=msgtype%>
    						<tr>
    							<td valign="top" class="normal_bold_green" align="left">CONTACT TYPE</td>
    							<td class="normal_bold_grey_light" valign="top" align="left"><%=request.form("contType")%></td>
    						</tr>
    						<tr>
    							<td valign="top" class="normal_bold_green" align="left">MESSAGE</td>
    							<td class="normal_bold_grey_light" valign="top" align="left"><%=request.form("message")%></td>
    						</tr>
    						<tr style="height:20px">
    							<td class="space" colspan="2"></td>
    						</tr>
    						<%end if%>
    						</table></td>	
    					</tr>
    					<tr style="height:10px">
    						<td></td>
    					</tr>
    Last edited by Mittineague; Sep 28, 2010 at 13:02. Reason: reformatting bbcode tags


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •