File: D:/HostingSpaces/SGroot/sylviastotalcare.nl/wwwroot/contactform.asp
<%@LANGUAGE="VBSCRIPT"%>
<%
Option Explicit
Dim TheMessage
Dim TheFormField
Dim ObjMail
Dim strNaam
Dim strAdres
Dim strPostcode
Dim strWoonplaats
Dim strEmail
Dim strTelefoon
Dim strVraag
For Each TheFormField in Request.Form
Select case TheFormField
Case "Naam"
if request.form("Naam") <> "" then
strNaam = "Naam: " & request.form("Naam") & vbCrLf
end if
Case "Adres"
if request.form("Adres") <> "" then
strAdres = "Adres: " & request.form("Adres") & vbCrLf
end if
Case "Postcode"
if request.form("Postcode") <> "" then
strPostcode = "Postcode: " & request.form("Postcode") & vbCrLf
end if
Case "Woonplaats"
if request.form("Woonplaats") <> "" then
strWoonplaats = "Woonplaats: " & request.form("Woonplaats")& vbCrLf
end if
Case "Email"
If request.form("Email") <> "" then
strEmail = "Email: " & request.form("Email")& vbCrLf
end if
Case "Telefoon"
If request.form("Telefoon") <> "" then
strTelefoon = "Telefoon: " & request.form("Telefoon") & vbCrLf
end if
Case "Vraag"
If request.form("Vraag") <> "" then
strVraag = "Vraag: " & request.form("Vraag") & vbCrLf
end if
End select
Next
TheMessage = "Vraag" & vbCrLf
TheMessage = TheMessage & vbCrLf
TheMessage = TheMessage & strNaam
TheMessage = TheMessage & strAdres
TheMessage = TheMessage & strPostcode
TheMessage = TheMessage & strWoonplaats
TheMessage = TheMessage & strEmail
TheMessage = TheMessage & strTelefoon
TheMessage = TheMessage & strVraag
Set objMail = CreateObject("CDO.Message")
objMail.Textbody = TheMessage
objMail.From = "webmaster@sylviastotalcare.nl"
objMail.To = "m.padding@gmail.com"
objMail.Subject = "Vraag"
objMail.Send
Set objMail = Nothing
%>
<html>
<head>
<title>Contact formulier - 2</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" link="#003366" vlink="#003366" bgcolor="#FFFFFF">
<center>
<table width=400>
<tr>
</tr>
<tr> </tr><tr> </tr><tr> </tr><tr> </tr>
<tr>
<td class="tekst"><img src="/images/spacer.gif" width=1 height=5>De vraag is doorgestuurd.<br><br></td>
</tr></table>
</center>
</body>
</html>