All pastes #764703 Raw Edit

Stuff

public text v1 · immutable
·published 2007-11-07 14:23 UTC
rendered paste body
function order_email($a, $b){
	
	$time = imap_headerinfo($imap, $mail_id);
	
	$time = $time->udate;
		
	if ($a == $b) {
	
		return 0;
		
	}
	
		return ($a < $b) ? -1 : 1;
	
	}

}

$mails = imap_search($imap, "UNDELETED");

usort($mails, "order_email");