Created
August 30, 2013 12:11
-
-
Save filipecrosk/6389227 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require 'class.phpmailer.php'; | |
//chama a classe de envio de email e define config inicial | |
$mail = new PHPMailer(); | |
$mail->CharSet = "UTF-8"; | |
$mail->IsSMTP(); | |
$mail->Host = "plantaosexy-mail.com"; | |
$mail->SMTPAuth = true; | |
$mail->Port = 587; | |
$mail->Username = "contato"; | |
$mail->Password = "5338e74dc"; | |
$remetente = "[email protected]"; | |
$mail->SetFrom($remetente,"PlantãoSexy"); | |
$mail->AddAddress('[email protected]'); | |
$mail->Subject = "Teste"; | |
$mail->MsgHTML("Teste de envio de email"); | |
$mail->IsHTML(true); | |
if(!$mail->Send()) { | |
?> | |
<script> | |
alert("Erro no envio: <?=$mail->ErrorInfo;?>"); | |
</script> | |
<? | |
} else { | |
?> | |
<script> | |
alert("E-mail enviado com sucesso."); | |
</script> | |
<? | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment