Guest User

Untitled

a guest
Dec 8th, 2017
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. require "phpmailer/class.phpmailer.php"; //include phpmailer class
  2. $msg= "hi";
  3. $mail = new PHPMailer();
  4. //Set up SMTP
  5. $mail->IsSMTP(); //Sets up a SMTP connection
  6. $mail->SMTPAuth = true; // Connection with the SMTP does require authorization
  7. $mail->SMTPSecure = "ssl"; // Connect using a TLS connection
  8. $mail->Host = "ssl://smtp.gmail.com:465"; // Gmail SMTP server address
  9. $mail->Port = 465; // Gmail SMTP port
  10. $mail->Encoding = '7bit';
  11.  
  12. // Authentication
  13. $mail->Username = "newdummy90@gmail.com"; // Your full Gmail address
  14. $mail->Password = "dummy123"; // Your Gmail password
  15. $mail->SMTPDebug = 2;
  16.  
  17. $mail->SetFrom('newdummy90@gmail.com');//
  18.  
  19. $mail->Subject = "Patient_Heart_Temp_Details";
  20. $mail->MsgHTML($msg);
  21.  
  22. // Send To
  23. $mail->AddAddress("nagashri27@gmail.com");
  24. $result = $mail->Send();
  25. $message = $result ? 'Successfully Sent!' : 'Sending Failed!';
  26. unset($mail);
Add Comment
Please, Sign In to add comment