%
if request.form("reload") = 1 then
nome = request("nome")
if len(nome) < 3 then adicionaerro("Informe o seu nome.")
email = request("email")
if valida_email(email) = "erro" then adicionaerro("Informe o seu e-mail.")
assunto = request("assunto")
if len(assunto) < 3 then adicionaerro("Informe o assunto.")
comentario = request("comentario")
if len(comentario) < 3 then adicionaerro("Informe o conteúdo da mensagem.")
if noErrors() then
Dim objMail
'Set objMail = Server.CreateObject("CDONTS.NewMail")
' objMail.BodyFormat = 0
' objMail.MailFormat = 0
' objMail.From = LCase(email)
' objMail.Subject = assunto
' objMail.to = "brunet@realworks.com.br"
' objMail.Body = comentario
' objMail.Send
'Set objMail = Nothing
Dim iMsg
Dim iConf
Dim Flds
Const cdoSendUsingPort = 2
set iMsg = CreateObject("CDO.Message")
set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
With Flds
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPort
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "mx2.laniway.com.br"
.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 10
.Update
End With
' Configure abaixo os campos que você quer enviar. Neste exemplo estamos usando os campos "de" e "mensagem" do formulário para enviar a mensagem. Configure também o título da mensagem de acordo com sua preferência
With iMsg
Set .Configuration = iConf
.To = "brunet@realworks.com.br"
.From = LCase(email)
.Subject = assunto
'.TextBody = HTML
.HTMLBody = comentario
.Send
End With
' Zera as variaveis
Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing
texto = "Obrigado pelo seu contato. Entraremos em contato
em breve!"
end if
end if
%>
···· Speedway ····
|
 |
|
|
|
|
<% if not noerrors() then%>
<% err=listaErros("| "," | ") %>
<% end if %>
<% if len(trim(texto)) < 1 then %>
<% else %>
<%= texto %>

<% end if %>
|
|
|
|
|