Copiersul 0 Denunciar post Postado Novembro 30, 2016 <?php >>(((...início do php)))<< require_once('class.phpmailer.php'); $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: text/html; charset=utf-8\r\n"; $headers .=("Location: http://www.americanone.com.br/index.html"); >>(((...final do php)))<< if(!$mailer->Send()) { echo "Mensagem nao enviada"; echo "Erro: " . $mailer->ErrorInfo; exit; } print "Sua mensagem foi enviada, obrigado!"; echo "<meta HTTP-EQUIV='Refresh' CONTENT='0;URL=http://www.americanone.com.br/index.html>"; ?> Bom dia! Preciso que após o envio da mensagem retorne para a página indicada, o código acima não funciona. Aguardo um retorno. Compartilhar este post Link para o post Compartilhar em outros sites
Web.Developer 9 Denunciar post Postado Novembro 30, 2016 Usa java script Compartilhar este post Link para o post Compartilhar em outros sites
Web.Developer 9 Denunciar post Postado Novembro 30, 2016 Tenta assim <?php //início do php require_once('class.phpmailer.php'); $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: text/html; charset=utf-8\r\n"; //final do php if(!$mailer->Send()) { echo "Mensagem nao enviada"; echo "Erro: " . $mailer->ErrorInfo; exit; } echo "<script> alert('Sua mensagem foi enviada, obrigado!'); window.location.href='http://www.americanone.com.br';</script>"; ?> Compartilhar este post Link para o post Compartilhar em outros sites
Copiersul 0 Denunciar post Postado Novembro 30, 2016 Obrigada! Compartilhar este post Link para o post Compartilhar em outros sites
LaerteDias 17 Denunciar post Postado Novembro 30, 2016 <?php //início do php require_once('class.phpmailer.php'); $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: text/html; charset=utf-8\r\n"; //final do php if(!$mailer->Send()) { echo "Mensagem nao enviada"; echo "Erro: " . $mailer->ErrorInfo; exit; } echo "Mensagem enviada" header('Location: http://www.americanone.com.br'); ?> Use header http://php.net/manual/pt_BR/function.header.php ao invés de javascript, pois as vezes o navegador se enrola com javascript Compartilhar este post Link para o post Compartilhar em outros sites