%@ language = "vbscript" %>
<% response.buffer = true %>
<%
if request.servervariables("content_length") <> 0 then
dim origem, destino, dataida, datavolta, hotel, categoria, quarto, nome, email, telefone, html, mail
origem = left(trim(request.form("origem")),50)
destino = left(trim(request.form("destino")),50)
dataida = request.form("dia1") & "/" & request.form("mes1") & "/" & request.form("ano1")
datavolta = request.form("dia2") & "/" & request.form("mes2") & "/" & request.form("ano2")
hotel = request.form("hotel")
if hotel = "s" then
categoria = request.form("categoria")
quarto = request.form("quarto")
end if
nome = left(trim(request.form("nome")),50)
email = left(lcase(trim(request.form("email"))),50)
telefone = "(" & request.form("fone1") & ") " & request.form("fone2")
html = ""
html = html & "Origem: "& origem &" "
html = html & "Destino: "& destino &" "
html = html & "Data de Ida: "& dataida &" "
html = html & "Data de Volta: "& datavolta &" "
html = html & "Hotel: "
if hotel = "s" then
html = html & "Sim "
html = html & "Categoria: "& categoria &" estrelas "
html = html & "Quarto: "
if quarto = "i" then
html = html & "Individual "
elseif quarto = "d" then
html = html & "Duplo "
else
html = html & "Triplo "
end if
else
html = html & "Não "
end if
html = html & "Nome: "& nome &" "
html = html & "E-mail: "& email &" "
html = html & "Telefone: "& telefone &"
"
html = html & "-----------------------------------"
html = html & " "
html = html & "MGA TRAVEL - Viagens e Turismo"
html = html & " "
html = html & "www.mgatravel.com.br"
html = html & " "
html = html & "-----------------------------------"
html = html & ""
'cdosys
on error resume next
mail.send
sch = "http://schemas.microsoft.com/cdo/configuration/"
set cdoconfig = createobject("cdo.configuration")
with cdoconfig.fields
.item(sch & "sendusing") = 2
.item(sch & "smtpserver") = "localhost"
.update
end with
set cdomessage = createobject("cdo.message")
with cdomessage
set .configuration = cdoconfig
.from = email
.to = "mga@mgatravel.com.br; silvana@mgatravel.com.br"
.bcc = "webmaster@mercantes.com.br"
.subject = "Reserva On-line"
.htmlbody = html
.send
end with
set cdomessage = nothing
set cdoconfig = nothing
response.write ""
response.write ""
else
%>