Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (db_num_rows($result)) {
- while ($row = db_fetch_object($result)) {
- $sql = ("SELECT * FROM {maildigest_mail} mm WHERE mm.uid = %d", $result->uid);
- $result = db_query($sql);
- while ($row = db_fetch_object($result)) {
- // group mails by user
- $allmail[$row->uid][] = $row;
- }
- foreach ($allmail as $uid => $mails) {
- // Send email
- set_time_limit(20);
- maildigest_send($mails, $uid);
- }
- }
- }
Add Comment
Please, Sign In to add comment