Advertisement
Guest User

Untitled

a guest
Feb 21st, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. use PHPMailer;
  2. $mail = new PHPMailer;
  3.  
  4.  
  5.  
  6. $mail->isSMTP();
  7. $mail->SMTPAuth = true;
  8. $mail->SMTPDebug = 1;
  9. $mail->Host = 'smtp.uhsevico.com';
  10. $mail->SMTPAuth = true;
  11. $mail->Username = "adm@mydomain.com.br";
  12. $mail->Password = "mypassoword";
  13. //$mail->SMTPSecure = 'tls';
  14.  
  15. $mail->Port = 587;
  16.  
  17. $mail->setFrom('sender@mydomain.com.br', 'contato imotur');
  18. mail->addAddress('receiver@yahoo.com', 'Diego Alves');
  19.  
  20.  
  21. $mail->Subject = 'Here is the subject';
  22.  
  23.  
  24. $mail->Body = "ImoTur no contato das atividades";
  25. //$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
  26.  
  27. if(!$mail->send()) {
  28. echo 'Message could not be sent.';
  29. echo 'Mailer Error: ' . $mail->ErrorInfo;
  30. } else {
  31. echo 'Message has been sent';
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement