Advertisement
Guest User

Untitled

a guest
Mar 4th, 2019
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. require '../vendor/autoload.php';
  2.  
  3. $mail = new PHPMailer;
  4.  
  5. $mail->isSMTP();
  6.  
  7. $mail->SMTPDebug = 2;
  8.  
  9. $mail->Host = 'smtp.gmail.com';
  10.  
  11. $mail->Port = 587;
  12.  
  13. $mail->SMTPSecure = 'tls';
  14.  
  15. $mail->SMTPAuth = true;
  16.  
  17. $mail->Username = "vector41line6@gmail.com";
  18.  
  19. $mail->Password = "password";
  20.  
  21. $mail->setFrom('vector41line6@gmail.com', 'vector 41 line6');
  22.  
  23. $mail->addReplyTo('vector41line6@gmail.com', 'vector 41 line6');
  24.  
  25. $mail->addAddress($email);
  26.  
  27. $mail->isHTML(true); // Set email format to HTML
  28. $mail->Subject = 'Vector 41 Recruitment';
  29.  
  30. $mail->Body = "some messages";
  31.  
  32. $mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
  33.  
  34.  
  35. //send the message, check for errors
  36. if (!$mail->send()) {
  37. echo "Mailer Error: " . $mail->ErrorInfo;
  38. } else {
  39. echo "Message sent!";
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement