| | |
| | | |
| | | |
| | | // get arguments |
| | | $args = get_opt(array('h' => 'host', 'u' => 'user', 'p' => 'pass', 'm' => 'mbox', 'f' => 'file')) + array('host' => 'localhost', 'mbox' => 'INBOX'); |
| | | $opts = array('h' => 'host', 'u' => 'user', 'p' => 'pass', 'm' => 'mbox', 'f' => 'file'); |
| | | $args = rcube_utils::get_opt($opts) + array('host' => 'localhost', 'mbox' => 'INBOX'); |
| | | |
| | | if ($_SERVER['argv'][1] == 'help') |
| | | { |
| | |
| | | // prompt for password |
| | | if (empty($args['pass'])) |
| | | { |
| | | $args['pass'] = prompt_silent("Password: "); |
| | | $args['pass'] = rcube_utils::prompt_silent("Password: "); |
| | | } |
| | | |
| | | // parse $host URL |
| | |
| | | $fp = fopen($args['file'], 'r'); |
| | | while (($line = fgets($fp)) !== false) |
| | | { |
| | | if (preg_match('/^From\s+/', $line) && $lastline == '') |
| | | if (preg_match('/^From\s+-/', $line) && $lastline == '') |
| | | { |
| | | if (!empty($message)) |
| | | { |