Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

Jow Xavier

Erro de acentução no email

Recommended Posts

Boa tarde sou novo nesse fórun,

 

Estou com um problema no meu email, qd envio o email chega para o destinatário com erro de acentuação, alguém pode me ajudar ???

Compartilhar este post


Link para o post
Compartilhar em outros sites

Opá valeu pelas boas vindas, e principamente pela ajuda q você tem me dado em outros fóruns, e espero q nesse ñ seja diferente hehehe ... Abaixo está o meu código.

 

<meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> <!-- define o indioma do email -->
<META HTTP-EQUIV="REFRESH" CONTENT="5;URL=pesquisar_projetos.asp"> <!-- define um redirecionamento automatico da página -->
<% 
if session("login") <> true then
  response.redirect "default.asp"
end if
%>
<style type="text/css">
<!--
#apDiv1 {
	position:absolute;
	width:188px;
	height:324px;
	z-index:1;
	left: 23px;
	top: 57px;
}
-->
</style>
<link href="estilos.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style><table width="700" height="480" border="0" cellpadding="0" cellspacing="0">
  <tr>
	<td height="100" colspan="2" valign="top"><img src="img/barra_jobs.jpg" width="700" height="100" /></td>
  </tr>
  
  <!-- Menu Topo -->
   <tr>
  <td height="25" colspan="2" valign="top"><img src="titulo/tit_clientes.gif"></td>
  </tr> 
  <tr> 
	<td width="14%" valign="top"> </td>
	<td width="86%" height="42"><!--#include file="includes/links.asp"--></td>
  </tr>
  <tr> 
	<td valign="top"> 
	  <!--#include file="includes/agenda.asp"-->
	<td valign="top" nowrap scope="col"><div align="left"> 
		<!-- #include file="config/conexao.asp"-->
<%

call abre_conectar

sql = "Select * from membros"  

set tab = cnn.execute(sql) %>
		  
</div>
		  <span class="titulo1">Usuário: </span>
				<span class="link1_inativo"><%Response.write(Session("nome")) %></span>				<a href="logout.asp" class="link1_inativo">(Sair)</a><br><br>

<div class=titulo1>Notificação de envio de e-email</div>
<br>
<%
'Resgata valor checkbox separados por vírgula.
strP=request.form("box")
titulo=request.form("titulo")
obs=request.form("obs")

ArrP=split( strP , "," ) 'No caso coloquei virgula, pois o separador é este, caso seja outro basta mudara para o desejado.

'Faz o loop para enviar até que dispare todos os selecionados.
for i = 0 to UBound(ArrP)
Set objmail = Server.CreateObject("CDONTS.NewMail") 

email = Session("email")
objMail.From = email   
objMail.To = ArrP(i)
objMail.Cc = ""
objMail.Bcc = ""

objMail.Subject = request.form("titulo") 'titulo da mensagem
sHTML = sHTML & "<html xmlns=""http://www.w3.org/1999/xhtml"">"
sHTML = sHTML & "<head>"
sHTML = sHTML & "<title>Thatto Interativa</title>" 
sHTML = sHTML & "</head>"
sHTML = sHTML & "<body leftmargin=""0"" topmargin=""0"" rightmargin=""0"" bottommargin=""0"" bgcolor="""">"
sHTML = sHTML & request.form("obs") 'corpo da mensagem
sHTML = sHTML & "</body>"
sHTML = sHTML & "</html>"

objMail.MailFormat = 0 
objMail.BodyFormat = 0 
objMail.body = sHTML

objMail.Send
sHTML = ""

On Error Resume Next
set objMail = Nothing

if Err <> 0 Then
Response.Write "Foi encontrado um erro (" & Err.Description & ")."
Response.End
End if

'Fim loop.
next

'Gera alerta de envio ao fim do código.
response.Write("<font face='verdana' size='1'><br>E-mails enviado com sucesso!</font><br>")
response.Write("<font face='verdana' size='1'>Para: "&strP&".</font>") %>
 
<%

'call abre_conectar

titulo=request.Form("titulo")
box=request.Form("box")
obs=request.Form("obs")

sql = "insert into agenda (titulo, obs, box)"
sql = sql & " values ('"&titulo&"', '"&obs&"', '"&box&"')"

set tab = cnn.execute(sql) 

call fecha_conectar
set tab = nothing %>

</div>
</div></td>
	  </tr>
	</table></td>
  </tr>
</table>

Pesquisei em outro fórun e me disseram pra eu usar

<meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> <!-- define o indioma do email -->
mas dá o mesmo erro

Compartilhar este post


Link para o post
Compartilhar em outros sites

troca para isso aqui?

sHTML = sHTML & "<html><meta http-equiv="content-type" content="text/html; charset=iso-8859-1">"
sHTML = sHTML & "<head>"

Compartilhar este post


Link para o post
Compartilhar em outros sites

Eu fiz isso e me retornou esse erro

Tipo de erro:

Erro de compilação do Microsoft VBScript (0x800A0401)

Fim da instrução esperado

/interno/admin/inserir_agenda.asp, line 81, column 41

sHTML = sHTML & "<html><meta http-equiv="content-type" content="text/html; charset=iso-8859-1">"

Arrumei as aspas assim:
sHTML = sHTML & "<html><meta http-equiv=""content-type"" content=""text/html; charset=iso-8859-1"">"
sHTML = sHTML & "<head>"
e ñ deu erro. Mas continua enviando o email com erro nos acentos !!!

Compartilhar este post


Link para o post
Compartilhar em outros sites

esse erro ocorre pois não colocaste as aspas na string

 

sHTML = sHTML & "<html><meta http-equiv=""content-type"" content=""text/html; charset=iso-8859-1"">"

 

acho que falta na sua pagina o code page

Compartilhar este post


Link para o post
Compartilhar em outros sites

então troca para UTF-8 o charset

Cara ñ funcionou já tentei te todos os jeitos e nada ... já postei em vários fóruns e tbm nada ...

 

 

esse erro ocorre pois não colocaste as aspas na string

 

sHTML = sHTML & "<html><meta http-equiv=""content-type"" content=""text/html; charset=iso-8859-1"">"

 

acho que falta na sua pagina o code page

ñ funcionou cara

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.