–
require ‘net/imap’
imap = Net::IMAP.new(‘localhost’, 993, true)
imap.authenticate(‘LOGIN’,‘dom’,‘mypassword’)
imap.examine(‘INBOX’)
imap.search([‘SINCE’,‘01-Jan-2000’]).each do |msg_id|
puts msg_id
imap.fetch(msg_id, ‘ENVELOPE’)[0].attr[‘ENVELOPE’]
end
This code will cause Ruby to core dump with a bus error after a number
of fetches. The number is not constant. Garbage collector acting up, or
am I at fault?
Cheers,
Dominic M.
IT Manager, GDC
3rd Floor
69 Wilson Street
London EC2A 2BB