Guest User

Untitled

a guest
Oct 11th, 2018
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. require("PHPMailer/src/PHPMailer.php");
  2. require("PHPMailer/src/SMTP.php");
  3. $mail = new PHPMailerPHPMailerPHPMailer();
  4. $mail = new PHPMailerPHPMailerPHPMailer(true);
  5. $mail->IsSMTP();
  6. $mail->SMTPDebug = 4;
  7. $mail->SMTPAuth = true;
  8. $mail->SMTPSecure = 'tls';
  9. $mail->Host = "mail.mydomain.in";
  10. $mail->Port = 587;
  11. $mail->IsHTML(true);
  12. $mail->Username = "mail";
  13. $mail->Password = "password";
  14.  
  15. $mail->SetFrom($admin_user_mail);
  16. $mail->AddAddress($login_user_mail);
  17. $mail->AddCC($admin_user_mail);
  18. $mail->Subject = "Mail Subject";
  19. $mail->Body = "Mail Content";
  20.  
  21.  
  22. if($mail->send())
  23. {
  24. echo "Mail Send";
  25. } else
  26. {
  27. echo "Mail Not sent";
  28. }
Add Comment
Please, Sign In to add comment