roundcubemail/program/lib/Roundcube/rcube_imap.php
public function copy_message($uids, $to_mbox, $from_mbox='')
    {
        if (!strlen($from_mbox)) {
            $from_mbox = $this->folder;
        }

        list($uids, $all_mode) = $this->parse_uids($uids);

        // exit if no message uids are specified
        if (empty($uids)) {
            return false;
        }

        if (!$this->check_connection()) {
            return false;
        }

        // copy messages
        $copied = $this->conn->copy($uids, $from_mbox, $to_mbox);

        if ($copied) {
            $this->clear_messagecount($to_mbox);
        }

        return $copied;
    }
public function copy_message($uids, $to_mbox, $from_mbox='')
    {
        if (!strlen($from_mbox)) {
            $from_mbox = $this->folder;
        }

        list($uids, $all_mode) = $this->parse_uids($uids);

        // exit if no message uids are specified
        if (empty($uids)) {
            return false;
        }

        if (!$this->check_connection()) {
            return false;
        }

        // copy messages
        $copied = $this->conn->copy($uids, $from_mbox, $to_mbox);

        if ($copied) {
            $this->clear_messagecount($to_mbox);
        }

        return $copied;
    }
public function copy_message ( $ uids , $ to_mbox , $ from_mbox = '' ) { if ( ! strlen ( $ from_mbox ) ) { $ from_mbox = $ this -> folder ; } list ( $ uids , $ all_mode ) = $ this -> parse_uids ( $ uids ) ; // exit if no message uids are specified if ( empty ( $ uids ) ) { return false ; } if ( ! $ this -> check_connection ( ) ) { return false ; } // copy messages $ copied = $ this -> conn -> copy ( $ uids , $ from_mbox , $ to_mbox ) ; if ( $ copied ) { $ this -> clear_messagecount ( $ to_mbox ) ; } return $ copied ; }
Copy a message from one folder to another

@param mixed  $uids      Message UIDs as array or comma-separated string, or '*'
@param string $to_mbox   Target folder
@param string $from_mbox Source folder

@return boolean True on success, False on error
Copy a message from one folder to another