%@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("cidade2")),"'","") estado = request("uf") sql = ("select uf from uf where id ="&estado) Set rs = conSQL.Execute(sql) estado = rs(0) interesse = request("interesse") fone = replace(trim(request("fone")),"'","") mensagem = replace(trim(request("mensagem")),"'","") auxData = now() ISODate = Year(auxData) & "-" & Month(auxData) & "-" & Day(auxData) & " " & hour(auxData) & ":" & minute(auxData) & ":" & second(auxData) 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 & "'" & ISODate &"')" on error resume next 'Response.Write(sql) 'response.end conSQL.Execute(sql) if err.number=0 then msg = "" 'insere no banco de emails sql = "INSERT INTO bancoEmail (ColEmail) VALUES('" & email &"')" conSQL.Execute(sql) if err.number=0 then msg = "" else msg = err.Description end if 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 & "É um prazer tê-lo como nosso assinante, em breve você começará a receber informativos do Portal de Auditoria/Escola de Auditoria.
"
MsgBody = MsgBody & "
Enquanto isso você pode conferir:
" MsgBody = MsgBody & "Veja nossas novidades em Cursos Online (com condições especiais)
www.portaldeauditoria.com.br/VideoAula/default.asp
Cursos presenciais
www.portaldeauditoria.com.br/cursos.asp
Curta nossa pagina no Facebook e fique informado sobre nossas atualizações
www.facebook.com/pages/Portal-de-Auditoria/179363315491067
Até breve! Equipe Portal de Auditoria
" MsgBody = MsgBody & "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
%>