X-Git-Url: http://www.club.cc.cmu.edu/~cmccabe/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=snarf_mail_imap.rb;fp=snarf_mail.rb;h=d4d6e93923430b4e35613f36f9826374a61bf7b2;hb=f1819fb0f4ce3620cbac7b399e925ed8abe66b09;hp=76c831ce8c0d2b521e1334d0b18cb3b9f0a19fc0;hpb=8d6747933abdeb5c60d58e1c53cf21b9b3f7814d;p=cmccabe-bin diff --git a/snarf_mail.rb b/snarf_mail_imap.rb similarity index 95% rename from snarf_mail.rb rename to snarf_mail_imap.rb index 76c831c..d4d6e93 100755 --- a/snarf_mail.rb +++ b/snarf_mail_imap.rb @@ -28,9 +28,9 @@ class MyOptions "Set delete policy to 'none' or 'old'. Default is 'none'.") do |d| opts.delete = d end - myparser.on("--username USERNAME", "-u", + myparser.on("--username [USERNAME]", "-u", "Email account to fetch. (example: \ -RareCactus@gmail.com)") do |u| +RareCactus@gmail.com or cmccabe@company.com)") do |u| opts.username = u end myparser.on("--list-folders", "-l", @@ -49,7 +49,7 @@ multiple mailboxes.") do |a| opts.mailboxes << a end myparser.on("--server [SERVER]", "-s", - "Email server to use") do |u| + "Email server to use. Example: imap.gmail.com") do |u| opts.server = u end end @@ -156,7 +156,7 @@ def snarf_mailbox(imap, mailbox) printf(".") STDOUT.flush() - if ($opts.delete != "none"): + if $opts.delete != "none" then # Delete messages imap.store(msg_seqnos, "+FLAGS", [:Deleted]) imap.expunge