Hi, I'm pretty new with code and I am slowly working my way to get my form working properly on my web site, I want to get the information mail to me when people hit the submit button of my contact form, but now I get an error message when I clic the submit button :
500 Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator to inform of the time the error occurred and of anything you might have done that may have caused the error.
More information about this error may be available in the server error log.if someone could tell me what is wrong with my code I would be
so happy and thankful you don't know how much!, so here is my code, my file name is :good.asp and the code is:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
' send by connecting to port 25 of the SMTP server
smtpserver = "mail.youandmewebsite.com"
youremail = "
admin@youandmewebsite.com"
yourpassword = "I typed my password but removed it for the forum"
Dim iMsg
Dim iConf
Dim Flds
Dim strHTML
Dim strSmartHost
Const cdoSendUsingPort = 2
StrSmartHost = "localhost"
set iMsg = CreateObject("CDO.Message")
set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
' set the CDOSYS configuration fields to use port 25 on the SMTP server
With Flds
.Item("
http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPort
.Item("
http://schemas.microsoft.com/cdo/configuration/smtpserver") = strSmartHost
.Item("
http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
.Update
End With
' build HTML for message body
strHTML = "Earhart Refrigeration contact form submission from "
strHTML = strHTML & request.form("realname") & "." & "<br /><br />"
strHTML = strHTML & request.form("message")
' apply the settings to the message
With iMsg
Set .Configuration = iConf
.To = "
admin@youandmewebsite.com"
.From =
info@youandmewebsite.com.Subject = request.form("subject")
.HTMLBody = strHTML
.Send
End With
' cleanup of variables
Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing
%>
so like I said, coding like this is abit like chinese to me, but if you see what is wrong here,
please tell me !
thank you