Advertisement
Guest User

Untitled

a guest
Jun 7th, 2018
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. <?php
  2.  
  3. $mail = new PHPMailer(true);
  4. $mail->IsSMTP(); // we are going to use SMTP
  5. $mail->SMTPAuth = true; // Authentication must be disabled
  6. $mail->SMTPSecure = 'ssl'; // prefix for secure protocol to connect to the server
  7. $mail->Host = 'smtp.gmail.com'; // setting GMail as our SMTP server
  8. $mail->Port = 465; // SMTP port to connect to GMail
  9. $mail->Username = 'emaillocalhost6@gmail.com';
  10. $mail->Password = 'inipassword';
  11. $mail->SetFrom('emaillocalhost6@gmail.com', 'Mail'); //Who is sending
  12. $mail->isHTML(true);
  13. $mail->SMTPOptions = array(
  14. 'ssl' => array(
  15. 'verify_peer' => false,
  16. 'verify_peer_name' => false,
  17. 'allow_self_signed' => true
  18. )
  19. );
  20. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement