Guest User

Untitled

a guest
Jan 17th, 2018
417
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. $mail = new PHPMailer;
  2.  
  3. //$mail->SMTPDebug = 3;
  4.  
  5. $mail->isSMTP();
  6. $mail->Host = 'smtp.gmail.com';
  7. $mail->SMTPAuth = true;
  8. $mail->Username = 'evertonradical@gmail.com';
  9. $mail->Password = 'MINHASENHA';
  10. $mail->SMTPSecure = 'tls';
  11. $mail->Port = 587;
  12.  
  13. $mail->setFrom('jose.everton.f@hotmail.com', '5tars');
  14. $mail->addAddress($email);
  15.  
  16. $mail->isHTML(true);
  17. $mail->CharSet = 'iso-8859-1';
  18.  
  19. $mail->Subject = 'Recuperação de senha';
  20. $mail->Body = 'Este é o corpo da mensagem de teste, em '.$pwrurl.' <b>HTML</b>! :)';
  21. $mail->AltBody = 'Este é o corpo da mensagem de teste, em Texto Plano! rn :)';
  22.  
  23. if(!$mail->send()) {
  24. echo 'Message could not be sent.';
  25. echo 'Mailer Error: ' . $mail->ErrorInfo;
  26. } else {
  27. echo 'Message has been sent';
  28. }
  29.  
  30. Invalid address: Message could not be sent.Mailer Error: You must provide at least one recipient email address.
Add Comment
Please, Sign In to add comment