Advertisement
Guest User

Código php

a guest
Dec 1st, 2017
589
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. <?php
  2.  
  3. require 'PHPMailer/PHPMailerAutoload.php';
  4.  
  5. $mail = new PHPMailer();
  6. $mail->IsSMTP();
  7. $mail->Host = 'smtp.mandic.com.br';
  8. $mail->Port = 587;
  9. $mail->SMTPSecure = 'TLS';
  10. $mail->SMTPAuth = true;
  11. $mail->IsHTML(true);
  12. $mail->Username = 'guidoportal@lojasguido.com.br';
  13. $mail->Password = 'SenhaAqui';
  14.  
  15. $mail->SMTPDebug = 2;
  16.  
  17. //E-mail remetente (deve ser igual ao que esta enviando)
  18. $mail->From = 'guidoportal@lojasguido.com.br';
  19.  
  20. //Nome do remetente
  21. $mail->FromName ='Celke';
  22.  
  23. //Assunto da mensagem
  24. $mail->Subject = 'Título - Recuperar Senha';
  25.  
  26. //Corpo da mensagem
  27. $mail->Body = 'Conteudo da mensagem';
  28.  
  29. //Corpo da mensagem em texto
  30. $mail->AltBody = 'Conteudo do e-mail em texto';
  31.  
  32. //Destinatario
  33. $mail->AddAddress ('zaza.naza95@gmail.com');
  34.  
  35. if ($mail->Send()) {
  36. echo "e-mail enviado com sucesso";
  37. }else{
  38. echo "Erro no envio do e-mail" .$mail->ErrorInfo;
  39. }
  40.  
  41. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement