All pastes #764709 Raw Edit

Stuff

public text v1 · immutable
·published 2007-11-07 14:27 UTC
rendered paste body
<?

function order_email($a, $b){
	
	$timea = imap_headerinfo($imap, $a);
	$a = $time->udate;
	
	$timeb = imap_headerinfo($imap, $b);
	$b = $time->udate;
		
	if ($a == $b) {
	
		return 0;
		
	}
	
		return ($a < $b) ? -1 : 1;
	
	}

}

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

usort($mails, "order_email");

?>