Depends a lot on what kind of pagination you're trying to do. Some methods may take two pages of code while others only need a few lines. Preferably, it should be done in PHP.
Urf. Don't use that script; Use this:
<?
$rows=mysql_num_rows(mysql_query("SELECT * FROM mail WHERE from_user='$user'"));
$rpp=8;
$pages = floor($rows / $rpp);
$page=$_GET[page];
if(!($page || is_int($page))){
$page=0;
}
$start=$page*$rpp; //creates the starting point for sorting the data
//die(print($start)); //checks the starting point for sorting the data
$q=mysql_query("SELECT * FROM mail WHERE from_user='$user' ORDER BY id DESC LIMIT $start,$rpp");
$next=$page + 1;
$prev=$page-1;
?>
<!--HTML or whatever goes here-->
<?
if($page<=$pages && $page!=0){
echo("<a href='/mymessageoutbox.phtml?page=$prev'><img src='/prev.png'/></a> | ");
}