Changeset 20384 for lang

Show
Ignore:
Timestamp:
10/01/08 20:39:36 (6 years ago)
Author:
mrkn
Message:

Allow to specify an arbitrary folder.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/ruby/misc/imap_fetch_and_forward.rb

    r17114 r20384  
    2323#     user: dankogai 
    2424#     pass: kogaidan 
     25#     folder: foobar 
    2526# 
    2627# If you save this file to "~/configuration.yml", 
     
    9394imap_user = conf['imap']['user'] 
    9495imap_pass = conf['imap']['pass'] 
     96imap_folder = conf['imap']['folder'] 
    9597imap = Net::IMAP.new(imap_host, imap_port, imap_ssl) 
    9698imap.login(imap_user, imap_pass) 
    97 imap.examine('hokkaido') 
     99imap.examine(imap_folder) 
    98100imap.search(%w[UNSEEN]).each {|mid| 
    99101  envelope = imap.fetch(mid, 'ENVELOPE')[0].attr['ENVELOPE']