Advertisement
Guest User

Untitled

a guest
Sep 9th, 2017
639
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.66 KB | None | 0 0
  1. require("phpmailer/phpmailer.inc.php");
  2.  
  3. $mail = new phpmailer;
  4.  
  5.  
  6. $mail->IsSMTP(); // set mailer to use SMTP
  7. $mail->Host = "ssl://smtp.gmail.com:465";  // specify main and backup server
  8. $mail->SMTPAuth = true;
  9. $mail->Username = 'example@gmail.com';
  10. $mail->Password = 'password';
  11.  
  12. $mail->From = "example@gmail.com";
  13. $mail->FromName = "Example";
  14.  
  15. $mail->AddAddress("michcio90po@gmail.com");
  16. $mail->AddReplyTo("info@site.com", "Information");
  17. $mail->WordWrap = 50;    // set word wrap
  18.  
  19. $mail->IsHTML(true);    // set email format to HTML
  20. $mail->Subject = "Here is the subject";
  21. $mail->Body = "This is the message body";
  22. $mail->Send(); // send message
  23. echo done;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement