يه مشكل با فرم هاي تماس asp هر كي ميتونه كمك كنه خواهشا ...

miladanimator

Active Member
با سلام به همگي ...
بازم يه مشكل برام پيش اومده . اگه كسي ميدونه كمك كنه خواهشا...
من براي سايتم از هاست شركت پشتيبانان شبكه و كنترل پنل PLesk استفادا ميكنم
و چند تا از فرم هاي webwiz رو روي هاستم قرار دادم تا بازديد كنندگان بتوونن با من از طريق اين فرم ها در تماس باشند.
اما وقتي فرم رو پر ميكنم و send رو مي زنم خطاي زير نمايش داده مي شه:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, and inform them of the time the error occurred and anything you might have done that may have caused the error.

مي خواستم بدونم علتش چيه؟
اگه كسي از اين هاست و كنترل پنل استفاده كرده بگه چه تغييراتي بايد بدم تا مشكل رفع بشه؟
البته من از هر دو نمونه cdonts , jmail استفاده كردم.
كد فرم به صورت زير نوشته شده:
send_email.asp
کد:
<%
'Set the response buffer to true so we execute all asp code before sending the HTML to the clients browser
Response.Buffer = True

'Dimension variables
Dim strBody 			'Holds the body of the e-mail
Dim objJMail 			'Holds the mail server object
Dim strMyEmailAddress 		'Holds your e-mail address
Dim strSMTPServerAddress	'Holds the SMTP Server address
Dim strCCEmailAddress		'Holds any carbon copy e-mail addresses if you want to send carbon copies of the e-mail
Dim strBCCEmailAddress		'Holds any blind copy e-mail addresses if you wish to send blind copies of the e-mail
Dim strReturnEmailAddress	'Holds the return e-mail address of the user


'----------------- Place your e-mail address in the following sting ---------------------------------

strMyEmailAddress = "[email protected]"

'---------- Place the address of the SMTP server you are using in the following sting ---------------

strSMTPServerAddress = "mail.nimroo.com"

'-------------------- Place Carbon Copy e-mail address in the following sting ------------------------

strCCEmailAddress = "" 'Use this string only if you want to send the carbon copies of the e-mail

'-------------------- Place Blind Copy e-mail address in the following sting -------------------------

strBCCEmailAddress = "" 'Use this string only if you want to send the blind copies of the e-mail

'-----------------------------------------------------------------------------------------------------


'Initialse strBody string with the body of the e-mail
strBody = "<h2>E-mail sent from form on Web Site</h2>"
strBody = strBody & "<br><b>Name: </b>" & Request.Form("name")
strBody = strBody & "<br><br><b>Comments: - </b><br>" & Replace(Request.Form("comments"), vbCrLf, "<br>")


'Send the e-mail

'Create the e-mail server object
Set objJMail = Server.CreateObject("JMail.SMTPMail")

'Out going SMTP mail server address
objJMail.ServerAddress = strSMTPServerAddress

'Senders email address
objJMail.Sender = "[email protected]"

'Senders name
objJMail.SenderName = Request.Form("name")

'Who the e-mail is sent to
objJMail.AddRecipient "[email protected]"

'Who the carbon copies are sent to
objJMail.AddRecipientCC strCCEmailAddress

'Who the blind copies are sent to
objJMail.AddRecipientBCC strBCCEmailAddress

'Set the subject of the e-mail
objJMail.Subject = "Enquiry sent from enquiry form on website"


'Set the main body of the e-mail (HTML format)
objJMail.HTMLBody = strBody

'Set the main body of the e-mail (Plain Text format)
'objJMail.Body = strBody

'Importance of the e-mail ( 1 - highest priority, 3 - normal, 5 - lowest)
objJMail.Priority = 3 

'Send the e-mail
objJMail.Execute

'Close the server object
Set objJMail = Nothing
%>
<html>
<head>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

</head>
<body text="#000000" bgcolor="#FFFFFF" link="#0000FF" vlink="#990099" alink="#FF0000">
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td height="2"> 
      <h1 align="center">Contact Us</h1>
    </td>
  </tr>
</table>
<br>
<br>
<table width="85%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td align="center"> Thank-you <% = Request.Form("name") %> for filling in the comments form.</td>
  </tr>
</table>
<div align="center"><br>
</div>
</body>
</html>

contact.htm

کد:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Contact Us</title>

<!-- Web Wiz JMmail Forms is written by Bruce Corkhill ©2001-2002
     	If you want your own ASP Email Form and form then goto http://www.webwizguide.info -->

<!-- Javascript function to check the submitted form has been filled in correctly before submitting -->
<SCRIPT  language="JavaScript">
<!-- Hide from older browsers
	
//Check the enquiry form is filled in correctly
function CheckForm () { 

	//Initialise variables
	var errorMsg = "";

	//Check for a name
	if (document.frmEnquiry.name.value == ""){
		errorMsg += "\n\tName \t\t- Enter your Name";	
	}
			
	//Check for comments
	if (document.frmEnquiry.comments.value == "") { 
 		errorMsg += "\n\tComments \t- Enter your comments";
	}
		
	//If there is aproblem with the form then display an error
	if (errorMsg != ""){
		msg = "______________________________________________________________\n\n";
		msg += "Your enquiry has not been sent because there are problem(s) with the form.\n";
		msg += "Please correct the problem(s) and re-submit the form.\n";
		msg += "______________________________________________________________\n\n";
		msg += "The following field(s) need to be corrected: -\n";
		
		errorMsg += alert(msg + errorMsg + "\n\n");
		return false;
	}
	
	return true;
}
// -->
</script>
<!-- Close the HTML document head -->
</head>
<!-- Start the HTML body -->
<body text="#000000" bgcolor="#FFFFFF" link="#0000FF" vlink="#990099" alink="#FF0000">
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td> <br>
      <h1 align="center">Contact Us</h1>
    </td>
  </tr>
</table>
<table width="85%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td> 
      <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr> 
          <td> 
            <form method="post" name="frmEnquiry" action="send_email.asp" onSubmit="return CheckForm();">
              <table width="450" border="0" align="center" cellpadding="0" cellspacing="0" >
                <!-- First tabe row -->
                <tr> 
                  <td> <font size="2"><b>*Indicates required fields </b></font> 
                </tr>
                <!-- second table row -->
                <tr> 
                  <td>Name* <br>
                    <input maxlength="30" name="name">
                  </td>
                  <!-- Coloum two in the second table row -->
                </tr>
                <!-- Third table row spread over 3 coloumns -->
                  <td height="170">Comments* <br>
                    <textarea name="comments" cols="50" rows="10"></textarea>
                </td>
                </tr>
                <tr align="center"> 
                  <td height="36"> 
                    <input type="submit" name="Submit" value="Submit Enquiry">
                    <input type="reset" name="Reset" value="Clear Form">
                  </td>
                </tr>
              </table>
            </form>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
</body>
</html>
 

omidak

Active Member
سلام:
سرورات یه مشکلی داره. شاید این activex رو support نمیکنه. با سروراتون تماس بگیرید و مشکل رو مطرح کنید :wink:
 

جدیدترین ارسال ها

بالا