PEAR Mail Queue

Look in Mail/Queue.php:

define('MAILQUEUE_TRY', 25);

This constant tells Mail_Queue how many times should try to send mails again if was any errors before.

php - PEAR Mail Queue Database Explaination - Server Fault

25回失敗するとあきらめる

Mail/Queue/Container/mdb2.php

    function _preload()
...
        $query = 'SELECT * FROM ' . $this->mail_table
                .' WHERE sent_time IS NULL AND try_sent < '. $this->try
                .' AND time_to_send <= '.$this->db->quote(date('Y-m-d H:i:s'), 'timestamp')
                .' ORDER BY time_to_send';
        $this->db->setLimit($this->limit, $this->offset);
        $res = $this->db->query($query);
...