I want to process a bunch of my emails using Net :: IMAP, but I want to skip them with attachments because they take too much time. Any hints? Ultimately, I want to load all the text and content of the HTML messages as quickly as possible. Right now I am collecting one UID at a time and parallelizing it with 15 processes (GMAIL is most acceptable), but I click on messages with attachments.
imap = Net::IMAP.new('imap.gmail.com', 993, usessl = true, certs = nil, verify = false) imap.authenticate('XOAUTH2', user.email, user.token) mailbox = "[Gmail]/All Mail" imap.select(mailbox) message_id = 177 imap.fetch(message_id,'RFC822')[0].attr['RFC822']
source share