Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require("libphp-phpmailer/class.phpmailer.php");
- // configuration
- require("../includes/config.php");
- $id = $_SESSION["id"];
- $email = CS50:: query(" SELECT email FROM users WHERE id = ?",$id);
- $mail = new PHPMailer();
- $mail -> IsSMTP();
- $mail -> Host = "smtp.gmail.com";
- $mail -> Password = "******";
- $mail -> Port = 587;
- $mail -> SMTPAuth = true;
- $mail -> SMTPDebug = 1;
- $mail -> SMTPSecure = "tls";
- $mail -> Username = "cs50finance8@gmail.com";
- $mail->isHTML(true);
- $mail -> SetFrom("cs50finance8@gmail.com");
- $mail -> Body = "click this link to reset your cs50 finance password https://ide50-yusufhelal.cs50.io/reset.php";
- $mail -> addAddress($email["0"]["email"]);
- $mail -> Send();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement