pls help me on this anyone. i would like to attach a reference id for each message in the mailbox based on its arrival time, and displaying this reference no. inside the message.php(message view) im planning on using imap_sort(****, SORTARRIVAL, *, ***) and put an incrementing no. on each message. but the problem is i dont know where to integrate this, thanks