Advertisement
Guest User

Untitled

a guest
Sep 15th, 2017
425
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. <?php
  2. require( 'class.phpmailer.php' );
  3.  
  4. $mail = new PHPMailer;
  5. $mail->IsSMTP();
  6. $mail->SMTPAuth = true;
  7. $mail->Host = "tls://smtp.gmail.com";
  8. $mail->Port = 25;
  9. $mail->Username = "xxxx@gmail.com";
  10. $mail->Password = "xxxxx";
  11. //Sending the actual email
  12. $mail->setFrom('xxxx2@gmail.com', 'Aaron');
  13. $mail->addAddress('xxxx2@gmail.com', 'Aaron'); // Add a recipient
  14. $mail->isHTML(false); // Set email format to HTML
  15. $mail->Subject = 'Calculation form results from ';
  16. $mail->Body = 'testing...';
  17.  
  18. if(!$mail->send()) {
  19. echo 'Message could not be sent. ';
  20. echo 'Mailer Error: ' . $mail->ErrorInfo;
  21. exit;
  22. }
  23. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement