Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php while ($users = $stmt->fetch(PDO::FETCH_ASSOC)) : ?>
- <p><?php echo $users['lastLogIn'];?> - <?php echo $users['userName']; ?></p>
- <?php endwhile; ?>
- function send_mail($email,$message,$subject){
- require_once('mailer/class.phpmailer.php');
- $mail = new PHPMailer();
- $mail->IsSMTP();
- $mail->SMTPDebug = 0;
- $mail->SMTPAuth = false;
- $mail->SMTPSecure = "";
- $mail->Host = "10.10.10.10";
- $mail->Port = 25;
- $mail->AddAddress($email);
- $mail->Username="Anonymous";
- $mail->Password="Anonymous";
- $mail->SetFrom('noreply@email.co.uk','Hello');
- $mail->AddReplyTo("noreply@email.co.uk","Hello");
- $mail->Subject = $subject;
- $mail->MsgHTML($message);
- $mail->Send();
- }
- $email = ("email@email.co.uk");
- $message= "
- Hello, $email
- <br /><br />
- Please find a list of users below who logged in today :
- <br /><br />
- I want the while loop content here";
- $subject = "Daile User Log";
- send_mail($email,$message,$subject);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement