Advertisement
Dante0704

Untitled

Jan 27th, 2017
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. <?php
  2. function newUser($nome, $email, $template) {
  3. require 'PHPMailer/PHPMailerAutoload.php';
  4. $mail = new PHPMailer;
  5. $mail->isSMTP();
  6. $mail->Debugoutput = 'html';
  7. $mail->Charset = 'UTF-8';
  8. // $mail->Host = "mail.imperiosolutionsti.com.br";
  9. $mail->Host = "smtp.outlook.com";
  10. $mail->SMTPAuth = true;
  11. $mail->Port = 587;
  12. $mail->Username = "augustoprogramador@hotmail.com";
  13. // $mail->Password = "minhasenha";
  14. $mail->Password = "minhasenha";
  15. // $mail->Host = "localhost";
  16. $mail->SMTPSecure = true;
  17. $mail->setFrom('augustosdc@hotmail.com', 'Império Solutions TI');
  18. // $mail->setFrom('contato@imperiosolutions.com.br', 'Império Solutions TI');
  19. $mail->addReplyTo('contato@imperiosolutions.com.br', 'Império Solutions TI');
  20. $mail->addAddress($email);
  21. $mail->addAddress('contato@imperiosolutions.com.br');
  22. $mail->Subject = 'PHPMailer SMTP test';
  23. //$mail->msgHTML(file_get_contents('novo_usuario.html'), dirname(__FILE__));
  24. $mail->Body = $template;
  25. $mail->IsHTML(true);
  26. //$mail->addAttachment('images/phpmailer_mini.png');
  27. if (!$mail->send()) {
  28. echo "Mailer Error: " . $mail->ErrorInfo;
  29. } else {
  30. echo "Message sent!";
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement