<%
vnom=Request.Form("nom")
vtelefon=Request.Form("telefon")
vmail=Request.Form("mail")
vdata_e=Request.Form("data_e")
vdata_s=Request.Form("data_s")
vnum_nits=Request.Form("num_nits")
vnum_pers=Request.Form("num_pers")
vnum_nens=Request.Form("num_nens")
vcomentaris=Request.Form("comentaris")
if vnom<>"" and vtelefon<>"" and vdata_e<>"" and vdata_s<>"" and vnum_nits<>"" and vnum_pers<>"" then
Response.write "
Form processed"
Response.write "Request will be attended in the next hours. You can call
(+0034) 687.01.88.01"
response.write "
Name: " & vnom & "
"
response.write "Telephone: " & vtelefon & "
"
response.write "Mail: " & vmail & "
"
response.write "Date of arrival: " & vdata_e & "
"
response.write "Date of departure: " & vdata_s & "
"
response.write "Number of nights: " & vnum_nits & "
"
response.write "Number of people: " & vnum_pers & "
"
response.write "Number of children: " & vnum_nens & "
"
response.write "Comments: " & vcomentaris & "
"
Set Correu = Server.CreateObject("Persits.MailSender")
Correu.Host = "smtp.canbielet.com"
Correu.Charset="ISO-8859-1" 'per tal de què funcionin els accents
Correu.Username="mbs342c"
Correu.Password="kleinman"
Correu.From = "info@canbielet.com"
Correu.AddAddress "info@canbielet.com"
Correu.Subject = Correu.EncodeHeader("Petició de reserva a Can Bielet")
cad_mail="Can Bielet booking processed" & chr(13) & chr(10)
cad_mail=cad_mail & "Nombre: " & vnom & chr(13) & chr(10)
cad_mail=cad_mail & "Teléfono: " & vtelefon & chr(13) & chr(10)
cad_mail=cad_mail & "Mail: " & vmail & chr(13) & chr(10)
cad_mail=cad_mail & "Fecha entrada: " & vdata_e & chr(13) & chr(10)
cad_mail=cad_mail & "Fecha salida: " & vdata_s & chr(13) & chr(10)
cad_mail=cad_mail & "Núm noches: " & vnum_nits & chr(13) & chr(10)
cad_mail=cad_mail & "Núm personas: " & vnum_pers & chr(13) & chr(10)
cad_mail=cad_mail & "Núm niños: " & vnum_nens & chr(13) & chr(10)
cad_mail=cad_mail & "Comentarios: " & vcomentaris & chr(13) & chr(10)
Correu.Body = cad_mail
Correu.Send
Set correu = Nothing
else
if vnom<>"" or vtelefon<>"" or vdata_e<>"" or vdata_s<>"" or vnum_nits<>"" or vnum_pers<>"" then
if vnom="" then response.write "
Name, compulse field
"
if vtelefon="" then response.write "
Telephone, compulse field
"
if vdata_e="" then response.write "
Date of entrance, compulse field
"
if vdata_s="" then response.write "
Date of departure, compulse field
"
if vnum_nits="" then response.write "
Number of nights, compulse field
"
if vnum_pers="" then response.write "
Number of people, compulse field
"
end if
%>
Guests opinion
Tel. 608.75.50.10
Tel. 637.71.05.41
<%
end if
%>