Guest User

Untitled

a guest
Aug 7th, 2018
326
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. if (isset($_POST['email'])) {
  2. $mail = new PHPMailer();
  3.  
  4. $mail->IsSMTP(true);
  5. $mail->Host = 'ssl://smtp.gmail.com:465';
  6. $mail->SMTPAuth = true;
  7. $mail->Username = 'username@yourdomain.com';
  8. $mail->Password = 'yourpassword';
  9.  
  10. $mail->From = "Whatever";
  11. $mail->FromName = "Whatever";
  12. $mail->AddAddress('receiver@theirdomain.com');
  13.  
  14. $mail->Subject = "Emails Subject Linke";
  15. $mail->Body = "Emails body goes here";
  16.  
  17. $mail->WordWrap = 50;
  18.  
  19. if ($mail->Send()) {
  20. echo "yay!";
  21. }
  22. }
Add Comment
Please, Sign In to add comment