%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% Set rs = Server.CreateObject("ADODB.Recordset") email = Request.Form("email") if request("enviar") = "Enviar" then 'insere o contato nome = replace(trim(request("nome")),"'","") email = replace(trim(email),"'","") cidade = replace(trim(request("cidade")),"'","") estado = request("uf") interesse = request("interesse") fone = replace(trim(request("fone")),"'","") mensagem = replace(trim(request("mensagem")),"'","") sql = "INSERT INTO contato (nome, email, telefone, cidade, uf, codinteresse, mensagem, datahora) VALUES(" sql = sql & "'" & nome &"', " sql = sql & "'" & email &"', " sql = sql & "'" & fone &"', " sql = sql & "'" & cidade &"', " sql = sql & "'" & estado &"', " sql = sql & interesse &", " sql = sql & "'" & mensagem &"', " sql = sql & "'" & now() &"')" on error resume next 'Response.Write(sql) 'response.end conSQL.Execute(sql) if err.number=0 then msg = "" else msg = err.Description end if if msg = "" then 'email para cliente Set objCDOSYSMail = Server.CreateObject("CDO.Message") Set objCDOSYSCon = Server.CreateObject ("CDO.Configuration") objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp2.locaweb.com.br" objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport")= 25 objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 30 objCDOSYSCon.Fields.update Set objCDOSYSMail.Configuration = objCDOSYSCon MsgBody = "" MsgBody = MsgBody & "
" MsgBody = MsgBody & "" MsgBody = MsgBody & "" MsgBody = MsgBody & "" MsgBody = MsgBody & "" MsgBody = MsgBody & "Mensagem enviada com sucesso.
" MsgBody = MsgBody & "Breve entraremos em contato.
"
MsgBody = MsgBody & "
Acompanhe nossos conteúdos, informações e lançamento de novos cursos em nosso site
www.portaldeauditoria.com.br
Nova mensagem recebida - Contato
" MsgBody = MsgBody & "Data/Hora: "&now()&"
"
MsgBody = MsgBody & "
Nome: "&nome&"
"
MsgBody = MsgBody & "
Email: "&email&"
"
MsgBody = MsgBody & "
Telefone: "&fone&"
"
MsgBody = MsgBody & "
Cidade: "&cidade&"
"
MsgBody = MsgBody & "
UF: "&estado&"
"
MsgBody = MsgBody & "
Mensagem: "&replace(mensagem,chr(10),"
")&"
"
MsgBody = MsgBody & ""
'response.write(MsgBody)
objCDOSYSMail.From = "Portal de Auditoria
<%
set conSQL=nothing
Set rs = Nothing
%>