Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Galera preciso de uma ajuda com o código abaixo, quando envio e-mail, ao receber o e-mail do remetente não é o mesmo que digitei no formulário, o servidor exige que o e-mail from seja do servidor, tem como incluir outro e usar o e-mail do servidor para enviar?
<%
'Email para onde serão enviados os dados do formulário
email_form = "jogo@meudominio.com"
destino = "nome@gmail.com"
copia = "nome@hotmail.com"
'Título do email
assunto_form = "Fale conosco"
'Servidor de email
servidor = "smtp.meudominio.com"
'Componente para envio do email: CDONTS | AspMail | AspEmail | AspQmail
componente = "CDONTS"
'Cabeçalho do texto do email recebido
cabecalho_email = "E-mail enviado pelo formulário do site Ajax Taipas."
'*******************************************************************
%>
<html>
<head>
<title>Fale Conosco</title>
<style type="text/css">.campo_alerta
{
font-family: Tahoma, Verdana, Arial; font-size: 11px; background-color: #F5ECA7;
border: 1px solid #01392A
}
.texto_pagina
{
font-family: Arial;
font-size: 11px;
color: #000000
}
.titulo_campos
{
font-family: arial;
font-size: 11px;
color: #000000;
background-color: #FFFFFF
}
.campos_formulario
{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #847543;
}</style>
<script type="text/javascript" src="../js/formulario_email.js"></script>
<link href="../css_style/HAportal.css" rel="stylesheet" type="text/css">
</head>
<body class=texto_pagina>
<%
If Not IsEmpty(Request.Form) Then
strMsg = "<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Strict//EN"" ""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"" >"
strMsg = strMsg & "<html><head>"
strMsg = strMsg & "<meta http-equiv=""Content-Type"" content=""text/html; charset=utf-8"">"
strMsg = strMsg & "</head>"
strMsg = strMsg & "<body leftmargin=""0"" marginwidth=""0"" topmargin=""0"" marginheight=""0"" offset=""0"" style=""background-color: #EEEdE7;"">"
strMsg = strMsg & "<table width=""100%"" cellspacing=""0"" class=""backgroundTable"" style=""background-color: #EEEdE7;"">"
strMsg = strMsg & "<tr>"
strMsg = strMsg & "<td valign=""top"" align=""center"">"
strMsg = strMsg & "<table width=""550"" cellpadding=""0"" cellspacing=""0"" style=""border-bottom: 1px solid #EEEdE7"">"
strMsg = strMsg & "<tr>"
strMsg = strMsg & "<td class=""headerBar"" style=""background-color: #FFFFFF"">"
strMsg = strMsg & "<table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""0"">"
strMsg = strMsg & "<tr>"
strMsg = strMsg & "</tr>"
strMsg = strMsg & "</table>"
strMsg = strMsg & "</td>"
strMsg = strMsg & "</tr>"
strMsg = strMsg & "</table>"
strMsg = strMsg & "<table width=""550"" cellpadding=""0"" cellspacing=""0"" class=""bodyTable"" style=""background-color: #FFFFFF"">"
strMsg = strMsg & "<tr>"
strMsg = strMsg & "<td align=""left"" style=""border-bottom: 1px solid #EEEdE7;padding: 20px;"">"
strMsg = strMsg & "<div class=""title"" style=""font-size: 16px;font-family: Arial, Helvetica, sans-serif;font-weight: bold;color: #FF0000;letter-spacing: -1px; padding-bottom: 20px;"">Não responda esta mensagem, encaminhe e digite o e-mail abaixo.</div>"
strMsg = strMsg & "<div class=""notetext"" style=""padding-bottom: 6px;color: #626262;font-size:10px;font-family: Tahoma;"">"
strMsg = strMsg & "<B>Nome:</B><BR><BR>" & Trim(Request.Form("nome")) & "<HR size=1 color=gainsboro>"
strMsg = strMsg & "<B>Sobrenome:</B><BR><BR>" & Trim(Request.Form("sobrenome")) & "<HR size=1 color=gainsboro>"
strMsg = strMsg & "<B>E-mail:</B><BR><BR>" & Trim(Request.Form("email")) & "<HR size=1 color=gainsboro>"
strMsg = strMsg & "<B>Mensagem:</B><BR><BR>" & Trim(Request.Form("mensagem")) & "<HR size=1 color=gainsboro>"
strMsg = strMsg & "</div>"
strMsg = strMsg & "</td>"
strMsg = strMsg & "</tr>"
strMsg = strMsg & "<tr>"
strMsg = strMsg & "<td class=""footerRow"" align=""left"" valign=""top"" style=""background-color: #EEEdE7;border-top: 10px solid #FFFFFF;padding: 20px 5px 20px 5px;"">"
strMsg = strMsg & "<div class=""footerText"" style=""font-size: 10px;color: #999999;line-height: 100%;font-family: Tahoma;"">"
strMsg = strMsg & "Proibida cópia total e/ou parcial sem prévia autorização.<br><br>"
strMsg = strMsg & "</div>"
strMsg = strMsg & "</td>"
strMsg = strMsg & "</tr>"
strMsg = strMsg & "</table>"
strMsg = strMsg & "</td>"
strMsg = strMsg & "</tr>"
strMsg = strMsg & "</table>"
strMsg = strMsg & "</body>"
strMsg = strMsg & "</html>"
strResposta = strResposta & "<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Strict//EN"" ""[http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd""](http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd)>"
strResposta = strResposta & "<html xmlns=""[http://www.w3.org/1999/xhtml""](http://www.w3.org/1999/xhtml) xml:lang=""pt-br"" lang=""pt"">"
strResposta = strResposta & "<head>"
strResposta = strResposta & "<link href=""../css_style/HAportal.css"" rel=""stylesheet"" type=""text/css"">"
strResposta = strResposta & "<meta http-equiv=""Content-Type"" content=""text/html; charset=windows-1252"">"
strResposta = strResposta & "</head>"
strResposta = strResposta & "<body>"
strResposta = strResposta & "<br><br><font class=""textBoldColor"" size=""2""><i>Muito obrigado</i>,"
strResposta = strResposta & "<br><br><font class=""textColor"" size=""2""><i>Equipe de atendimento e relacionamento ao cliente.</i>"
strResposta = strResposta & "</body></html>"
EnviaEmail servidor, componente, email_form, email_form, destino, copia, assunto_form, strMsg, strRespostaCase "CDONTS"
on error resume next
Set eObjMail = Server.CreateObject("CDONTS.NewMail")
eObjMail.to = ParaEmail
eObjMail.from = NomeEmail & "<" & Email & ">"
eObjMail.subject = Assunto
eObjMail.Importance = 1
eObjMail.BodyFormat = 0
eObjMail.MailFormat = 0
eObjMail.body = Mensagem
eObjMail.send
Set eObjMail = nothing
Set eObjMail = Server.CreateObject("CDONTS.NewMail")
eObjMail.to = CopiaEmail
eObjMail.from = NomeEmail & "<" & Email & ">"
eObjMail.subject = Assunto
eObjMail.Importance = 1
eObjMail.BodyFormat = 0
eObjMail.MailFormat = 0
eObjMail.body = Mensagem
eObjMail.send
Set eObjMail = nothing
Case "AspMail"
on error resume next
Set eObjMail = Server.CreateObject("SMTPsvg.Mailer")
eObjMail.FromName = NomeEmail
eObjMail.FromAddress = Email
eObjMail.RemoteHost = Host
eObjMail.AddRecipient "", ParaEmail
eObjMail.Subject = Assunto
eObjMail.ContentType = "text/html"
eObjMail.BodyText = Mensagem
eObjMail.SendMail
Set eObjMail = nothing
Case "AspEmail"
on error resume next
Set eObjMail = Server.CreateObject("Persits.MailSender")
eObjMail.Host = Host
eObjMail.From = Email
eObjMail.FromName = NomeEmail
eObjMail.AddReplyTo Email
eObjMail.AddAddress ParaEmail
eObjMail.Subject = Assunto
eObjMail.isHTML = true
eObjMail.Body = Mensagem
eObjMail.Send
Set eObjMail = nothing
Case "AspQmail"
on error resume next
Set eObjMail = Server.CreateObject("SMTPsvg.Mailer")
eObjMail.QMessage = 1
eObjMail.FromName = NomeEmail
eObjMail.FromAddress = Email
eObjMail.RemoteHost = Host
eObjMail.AddRecipient "", ParaEmail
eObjMail.Subject = Assunto
eObjMail.BodyText = Mensagem
objNewMail.SendMail
Set eObjMail = nothing
End Select
End Function
%>
<img border="0" src="../img_mail/enviado.gif">
<%
Else
%>
<form name="form_incluir" method="post" action="<%=Request.ServerVariables("SCRIPT_NAME")%>" onsubmit="return verifica_form(this);">
<div class="textBoldColorBLUE">FALE COM O AJAX TAIPAS</div>
<table width="100%" border="0" cellspacing="3" cellpadding="2" class="bgTable">
<tr>
<td align="right" nowrap class="textBold">PRIMEIRO NOME:</td>
<td>
<input type="text" name="nome" maxlength="50" value="" onKeyPress="desabilita_cor(this)" df_verificar="sim" class="form" size="20">
</td>
</tr>
<tr>
<td align="right" nowrap class="textBold">E-MAIL:</td>
<td>
<input type="text" name="email" maxlength="50" value="" onKeyPress="desabilita_cor(this)" df_verificar="sim" id="email" class="form" size="20">
</td>
</tr>
<tr>
<td align="right" nowrap class="textBold">ASSUNTO:</td>
<td>
<input type="text" name="assunto" maxlength="70" value="" onKeyPress="desabilita_cor(this)" df_verificar="sim" class="form" size="30">
</td>
</tr>
<tr>
<td valign="top" align="right" nowrap class="textBold">MENSAGEM:</td>
<td>
<textarea name="mensagem" df_verificar="sim" onKeyPress="desabilita_cor(this)" wrap="VIRTUAL" class="form" rows="10" cols="35"></textarea>
</td>
</tr>
</table>
<input type="submit" name="submit" value="Enviar" class="button">
</form></body>
</html>Carregando comentários...