| | |
| | | |
| | | $CWD = $INSTALL_PATH = preg_replace('/bin\/$/', '', getcwd() . '/'); |
| | | ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . $CWD.'program/'); |
| | | ini_set('memory_limit', -1); |
| | | |
| | | require_once('include/rcube_shared.inc'); |
| | | require_once('include/rcube_imap.inc'); |
| | |
| | | function print_usage() |
| | | { |
| | | print "Usage: msgimport -h imap-host -u user-name -f message-file\n"; |
| | | print "-host IMAP host\n"; |
| | | print "-user IMAP user name\n"; |
| | | print "-file Message file to upload\n"; |
| | | print "--host IMAP host\n"; |
| | | print "--user IMAP user name\n"; |
| | | print "--file Message file to upload\n"; |
| | | } |
| | | |
| | | |
| | |
| | | echo "Password: "; |
| | | $args['pass'] = trim(fgets(STDIN)); |
| | | |
| | | // clear password input |
| | | echo chr(8)."\rPassword: ".str_repeat("*", strlen($args['pass']))."\n"; |
| | | |
| | | // parse $host URL |
| | | $a_host = parse_url($args['host']); |
| | | if ($a_host['host']) |