File: D:/HostingSpaces/HVliet/thomashuisdeborg.nl/wwwroot/old/nl/infoform.asp
<%
On Error Resume Next
'******************************************************************************
' This script requires that SMTPSVG.DLL is installed on the server
' Place the dll in c:\winnt\system32 directory (or equivalent)
' and type 'regsvr32 c:\winnt\system32\smtpsvg.dll' to enable the dll.
'OR**OR**OR**OR**OR**OR**OR**OR**OR**OR**OR**OR**OR**OR**OR**OR**OR**OR**OR****
' This script requires that IIS-SMTPservice is installed on the server
' configure the SMTPservice: Select the "Delivery" tab. and "Advanced"
' In the "Fully Qualified Domain Name" text box, enter the IIS computer name.
' In the "Smart Host" text box, enter the name of your SMTP server.
' Make sure the Inetuser account has write permissions on the mailqueue
'******************************************************************************
' This script was written by Fuzzy Daze / Thicor Services and may be modified
' and distributed without any limitations. I would appreciate if you would
' leave this header intact if you do so.
'******************************************************************************
'******************************************************************************
' SECTION1
' Most Variables are in this section. You should probably change the
' Label-names and the label-attributes.
' If you use a form-element that requires a closing tag or option values,
' you must insert it in the table yourself.
'******************************************************************************
' Name of this document if you choose to change it. Do not write .asp!!!
DocName = "infoform"
' type of mailer you use for this form
'Mailform = "smtpsvg"
Mailform = "ms-smtp"
'TITLE AND TEXT:
FormTitle = "Sneeuwberg Appartementen informatie formulier"
ResponseText = "<H3>Uw aanvraag wordt verwerkt en u krijgt zo spoedig mogelijk bericht<H3>"
RequiredText = "<H3>U moet alle gemarkeerde velden invullen voor u op 'Verzenden' klikt.</H3>"
MailSender = "Infoform@sneeuwberg.nl"
'SmtpServer = "smtp.uwdomein.nl"
'MailReceiver = "infoform.sneeuwberg@thicor.com"
MailReceiver = "henk.vanvliet.planet.nl"
MailSubject = "Sneeuwberg website infoform"
lngImportance = 1
'INPUT FIELDS:
'make sure all labels are the same size. (using spaces)
'This will improve the layout of the returned mail.
Label01 = "Uw Naam:* "
Label02 = "Bedrijf: "
Label03 = "Adres: "
Label04 = "Postcode / Plaats: "
Label05 = "Telefoonnummer: "
Label06 = "Email adres:* "
Label07 = "Sneeuwberg algemeen "
Label08 = "De appartementen "
Label09 = "De omgeving "
Label12 = "Ik wil graag een brochure ontvangen"
Label13 = "Direct contact met een beheerder "
Label14 = "Ik heb u gevonden via "
Label15 = "Vragen en opmerkingen "
If Request.Form.Count = 0 Then
'All Attributes of the input fields exept "Name="
Attrib01 = "Input Type='Text' Value='' Size='40'"
Attrib02 = "Input Type='Text' Value='' Size='40'"
Attrib03 = "Input Type='Text' Value='' Size='40'"
Attrib04 = "Input Type='Text' Value='' Size='40'"
Attrib05 = "Input Type='Text' Value='' Size='40'"
Attrib06 = "Input Type='Text' Value='' Size='40'"
Attrib07 = "Input Type='Checkbox' Value='Ja'"
Attrib08 = "Input Type='Checkbox' Value='Ja'"
Attrib09 = "Input Type='Checkbox' Value='Ja'"
Attrib12 = "Input Type='Checkbox' Value='Ja'"
Attrib13 = "Input Type='Checkbox' Value='Ja'"
Attrib14 = "Select size='1'"
Attrib15 = "textarea ROWS=3 COLS=30"
'******************************************************************************
' SECTION2
' This section contains the table and it's layout. Be carefull when you edit
' this section.
'******************************************************************************
'******************************************************************************
' Table header. You do not need to edit this unless you don't like the colors
'******************************************************************************
Response.Write "<html><head><title>" &FormTitle &"</title>" &vbNewLine
Response.Write "<LINK HREF='../include/styles.css' REL='stylesheet' TYPE='text/css'>" &vbNewLine
Response.Write "</head>" &vbNewLine
Response.Write "<body>" &vbNewLine
%>
<p><font size="5">Informatie aanvraagformulier</font></p>
<p>Heeft u na het bezoeken van onze website vragen? <br>
Stuur dan middels dit formulier uw gegevens en omschrijf uw vraag of opmerking.<br>
We nemen dan zo spoedig mogelijk contact met u op.<br>
<br>
Met vriendelijke groet,
</p>
<p><b>Henk van Vliet en Hennie Linders</b>
<p>
<%
Response.Write "<div align='center'>" &vbNewLine
Response.Write "<form action='" &DocName &".asp?command=send' method='post' language='VBScript'>" &vbNewLine
Response.Write "<table border='1' cellspacing='0' cellpadding='0'>" &vbNewLine
Response.Write "<th> " &FormTitle &"</th>" &vbNewLine
Response.Write "<tr><td>" &vbNewLine
Response.Write "<table border='0' cellpadding='3'>" &vbNewLine
Response.Write "<tr><td colspan='3'></td></tr>" &vbNewLine
'******************************************************************************
Response.Write "<tr><td>" &Label01 &"</td><td colspan='2'><" &Attrib01 &" name='Label001'></td></tr>" &vbNewLine
Response.Write "<tr><td>" &Label02 &"</td><td colspan='2'><" &Attrib02 &" name='Label002'></td></tr>" &vbNewLine
Response.Write "<tr><td>" &Label03 &"</td><td colspan='2'><" &Attrib03 &" name='Label003'></td></tr>" &vbNewLine
Response.Write "<tr><td>" &Label04 &"</td><td colspan='2'><" &Attrib04 &" name='Label004'></td></tr>" &vbNewLine
Response.Write "<tr><td>" &Label05 &"</td><td colspan='2'><" &Attrib05 &" name='Label005'></td></tr>" &vbNewLine
Response.Write "<tr><td>" &Label06 &"</td><td colspan='2'><" &Attrib06 &" name='Label006'></td></tr>" &vbNewLine
Response.Write "<tr><td>Ik wil graag informatie over:</td><td><" &Attrib07 &" name='Label007'></td><td>" &Label07 &"</td></tr>" &vbNewLine
Response.Write "<tr><td></td><td><" &Attrib08 &" name='Label008'></td><td>" &Label08 &"</td></tr>" &vbNewLine
Response.Write "<tr><td></td><td><" &Attrib09 &" name='Label009'></td><td>" &Label09 &"</td><td></tr>" &vbNewLine
Response.Write "<tr><td></td><td><" &Attrib12 &" name='Label012'></td><td>" &Label12 &"</td></tr>" &vbNewLine
Response.Write "<tr><td></td><td><" &Attrib13 &" name='Label013'></td><td>" &Label13 &"</td></tr>" &vbNewLine
Response.Write "<tr><td>" &Label14 &"</td><td colspan='2'><" &Attrib14 &" name='Label014'>" &vbNewLine
Response.Write " <option value=''>Kies:</option>" &vbNewLine
Response.Write " <option value='Zoekmachine'>Zoekmachine</option>" &vbNewLine
Response.Write " <option value='Folder'>Uw/Een Folder</option>" &vbNewLine
Response.Write " <option value='Kennis'>Een Kennis</option>" &vbNewLine
Response.Write " <option value='Toeval'>Toeval</option>" &vbNewLine
Response.Write " </select></td></tr>" &vbNewLine
Response.Write "<tr><td>" &Label15 &"</td><td colspan='2'><" &Attrib15 &" name='Label015'></textarea></td></tr>" &vbNewLine
Response.Write "<tr><td></td><td colspan='3'> </td></tr>" &vbNewLine
Response.Write "<tr><td colspan='3' align='center'> " &vbNewLine
Response.Write " <input type='submit' value='Verzenden' name='Send'><input type='reset' value='Wissen' name='Clear'>" &vbNewLine
Response.Write " <small>* = verplicht veld</small></td></tr>" &vbNewLine
Response.Write "</table>" &vbNewLine
Response.Write "</td><tr></table></form></div></body></html>" &vbNewLine
'*********************************************************
' SECTION3
' Next delete the lines of the items that are not required
' Beware not to delete the 'Then' statement when deleting
' the last item.
'*********************************************************
ElseIf Request.Form("Label001")="" OR _
Request.Form("Label006")="" Then
Response.Write "<html><head><title>" &FormTitle &"</title>" &vbNewLine
Response.Write "<LINK HREF='../_private/styles.css' REL='stylesheet' TYPE='text/css'>" &vbNewLine
Response.Write "</head>" &vbNewLine
Response.Write "<body>" &vbNewLine
Response.Write "<div align='center'><p> </p>" &vbNewLine
Response.Write "<H2>" &FormTitle &"</H2><p>" &RequiredText &vbNewLine
Response.Write "<INPUT TYPE='button' VALUE='Return to the form' onClick='history.go(-1)'>" &vbNewLine
Response.Write "</div></body></html>" &vbNewLine
'*********************************************************
' SECTION4
' The next section actually mails the contents of the Form
' Do not edit this section unless you aded more fields
'*********************************************************
ElseIf Request.QueryString("command") = "send" Then
BodyText = Label01 & Chr(9) & Request.Form("Label001") & Chr(13) & Chr(10) &_
Label02 & Chr(9) & Request.Form("Label002") & Chr(13) & Chr(10) &_
Label03 & Chr(9) & Request.Form("Label003") & Chr(13) & Chr(10) &_
Label04 & Chr(9) & Request.Form("Label004") & Chr(13) & Chr(10) &_
Label05 & Chr(9) & Request.Form("Label005") & Chr(13) & Chr(10) &_
Label06 & Chr(9) & Request.Form("Label006") & Chr(13) & Chr(10) &_
Label07 & Chr(9) & Request.Form("Label007") & Chr(13) & Chr(10) &_
Label08 & Chr(9) & Request.Form("Label008") & Chr(13) & Chr(10) &_
Label09 & Chr(9) & Request.Form("Label009") & Chr(13) & Chr(10) &_
Label12 & Chr(9) & Request.Form("Label012") & Chr(13) & Chr(10) &_
Label13 & Chr(9) & Request.Form("Label013") & Chr(13) & Chr(10) &_
Label14 & Chr(9) & Request.Form("Label014") & Chr(13) & Chr(10) &_
Label15 & Chr(9) & Request.Form("Label015")
If Mailform = "ms-smtp" Then
Set myCDONTSMail = CreateObject("CDONTS.NewMail")
myCDONTSMail.Send MailSender,MailReceiver,MailSubject,BodyText,lngImportance
Set myCDONTSMail = Nothing
SentMail = 1
ElseIf Mailform = "smtpsvg" Then
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
If Err.Number <> 0 Then
AlertMessage = "Error: Could not create SMTPsvg.Mailer object. Contact Administrator. " & Err.Number & ": " & Err.Description
Else
Mailer.BodyText = BodyText
Mailer.FromAddress = MailSender
Mailer.RemoteHost = SmtpServer
Mailer.Recipient = MailReceiver
Mailer.Subject = MailSubject
If Not Mailer.SendMail Then
SentMail = 0
Else
SentMail = 1
End If
Set Mailer = Nothing
End If
End If
'************************************************************
' SECTION5
' The next section returns a page to confirm your submission
' If you want to change the response-text, do so at the start
' of this script
' Do not edit this section
'************************************************************
If SentMail>0 Then
Response.Write "<html><head><title>" &FormTitle &"</title>" &vbNewLine
Response.Write "<LINK HREF='../_private/styles.css' REL='stylesheet' TYPE='text/css'>" &vbNewLine
Response.Write "</head><body>" &vbNewLine
Response.Write "<blockquote><p><strong>" &FormTitle
Response.Write "</strong></p>" &vbNewLine
Response.Write "<p><small>"
Response.Write ResponseText &"</small></p></blockquote></body></html>"
End If
End If
%>