Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require("libphp-phpmailer/class.phpmailer.php");
- $mail = new PHPMailer();
- $mail->IsSMTP();
- $mail->SMTPAuth = true;
- $mail->SMTPSecure = "tls";
- $mail->Host = "smtp.gmail.com"; // change to your email host
- $mail->Port = 587; // change to your email port
- $mail->Username = "vasyapupkinkram123@gmail.com"; // change to your username
- $mail->Password = "123"; // change to your email password
- $mail->setFrom("vasyapupkinkram123@gmail.com"); // change to your email password
- $mail->AddAddress("ponomarovmax@gmail.com"); // change to user's email address
- $mail->Subject = "trial"; // change to email's subject
- $mail->Body = "<h1>hello, world!</h1>"; // change to email's body, add the needed link here
- if ($mail->Send() == false)
- {
- die($mail->ErrInfo);
- }
- else
- {
- echo "It worked!\n";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement