Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2017
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. <?php while ($users = $stmt->fetch(PDO::FETCH_ASSOC)) : ?>
  2. <p><?php echo $users['lastLogIn'];?> - <?php echo $users['userName']; ?></p>
  3. <?php endwhile; ?>
  4.  
  5. function send_mail($email,$message,$subject){
  6. require_once('mailer/class.phpmailer.php');
  7. $mail = new PHPMailer();
  8. $mail->IsSMTP();
  9. $mail->SMTPDebug = 0;
  10. $mail->SMTPAuth = false;
  11. $mail->SMTPSecure = "";
  12. $mail->Host = "10.10.10.10";
  13. $mail->Port = 25;
  14. $mail->AddAddress($email);
  15. $mail->Username="Anonymous";
  16. $mail->Password="Anonymous";
  17. $mail->SetFrom('noreply@email.co.uk','Hello');
  18. $mail->AddReplyTo("noreply@email.co.uk","Hello");
  19. $mail->Subject = $subject;
  20. $mail->MsgHTML($message);
  21. $mail->Send();
  22. }
  23.  
  24. $email = ("email@email.co.uk");
  25. $message= "
  26. Hello, $email
  27. <br /><br />
  28. Please find a list of users below who logged in today :
  29. <br /><br />
  30. I want the while loop content here";
  31. $subject = "Daile User Log";
  32.  
  33. send_mail($email,$message,$subject);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement