sql page separately displays sent and received emails