SHARE
TWEET

Untitled

a guest Jun 8th, 2017 106 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     require("libphp-phpmailer/class.phpmailer.php");
  2.    
  3.     $mail = new PHPMailer();
  4.     $mail->IsSMTP();
  5.     $mail->SMTPAuth = true;
  6.     $mail->SMTPSecure = "tls";
  7.     $mail->Host = "smtp.gmail.com"; // change to your email host
  8.     $mail->Port = 587; // change to your email port
  9.    
  10.     $mail->Username = "vasyapupkinkram123@gmail.com"; // change to your username
  11.     $mail->Password = "123"; // change to your email password
  12.     $mail->setFrom("vasyapupkinkram123@gmail.com"); // change to your email password
  13.    
  14.     $mail->AddAddress("ponomarovmax@gmail.com"); // change to user's email address
  15.    
  16.     $mail->Subject = "trial"; // change to email's subject
  17.     $mail->Body = "<h1>hello, world!</h1>"; // change to email's body, add the needed link here
  18.    
  19.     if ($mail->Send() == false)
  20.     {
  21.         die($mail->ErrInfo);
  22.     }
  23.     else
  24.     {
  25.         echo "It worked!\n";
  26.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top