<% if Request.Form("acao") = "Assinar" then %> <% rem ------------------------------------------------- rem - grava dados no DB rem ------------------------------------------------- SQLStatement = "INSERT into newsletter (nome, email, cidade, uf, newsletter) values ('" &_ Request.Form("nome") & "','" & Request.Form("email") & "','" &_ Request.Form("cidade") & "','" & Request.Form("estado") & "', True)" if debug_is_on then response.write "newsletter.asp (37):" & SQLStatement oConn.Execute(SQLStatement) oConn.Close Set OConn = Nothing ' Create the JMail message Object set mailer = Server.CreateOBject( "JMail.Message" ) ' Set logging to true to ease any potential debugging ' And set silent to true as we wish to handle our errors ourself mailer.Logging = true mailer.silent = true ' Most mailservers require a valid email address ' for the sender mailer.FromName = Request.form("nome") mailer.From = Request.form("email") ' Next we have to add some recipients. mailer.AddRecipient "claudia@ibex.com.br", "claudia" mailer.AddRecipient "enxaqueca@enxaqueca.com.br" , "Dr. Feldman" 'mailer.AddRecipient "raul.steler@ibex.com.br" ,"Dr. Raul" ' The subject of the message mailer.Subject = "[Enxaqueca.com.br] Nova Assinatura na Newsletter" ' As only HTML formatted emails can contain inline images ' we use HTMLBody and appendHTML mailer.HTMLBody = "
Tivemos mais uma assinatura em nossa newsletter!

" &_ " " &_ " " &_ " " &_ " " &_ " " &_ " " &_ " " &_ " " &_ " " &_ " " &_ " " &_ " " &_ " " &_ "
" &_ " " &_ " " &_ " Nome? " & Request.Form("nome") & "
" &_ " E-mail? " & Request.Form("email") & "
" &_ " Cidade" &_ Request.Form("cidade") & "
" &_ " Estado" &_ Request.Form("uf") & "
" ' But as not all mailreaders are capable of showing HTML emails ' we will also add a standard text body 'mailer.Body = "too bad you can't read HTML" 'mailer.appendText " There would have been a nice picture for you" If mailer.Send("127.0.0.1") then %> Sua assinatura em nosso boletim foi feita com sucesso. <% Else Response.Write "Sua assinatura não pode ser feita. Por favor tente mais tarde" & mailer.log End If ' And we're done! the message has been sent. set mailer = nothing %>



<% else %>

 

Seu nome?
Seu e-mail?
(Atenção: Preencha corretamente este campo)
Cidade

Estado

 

 

 

<%end if %>