How to parse mail in Ruby-Mail 2.3 like in TMail? -


given tmail seems have problems ruby 1.9.2 have tried use mail instead. in old code had

 gmail = net::imap.new(gmail_host, gmail_port, gmail_ssl)       gmail.login(gmail_user, gmail_pass)       gmail.select('inbox')       gmail.uid_search(["not","seen"]).each |message_id|       tmail::mail.parse(gmail.uid_fetch(message_id, 'rfc822').first.attr['rfc822'])       .... 

how go implementing same in mail? i've tried

mail.read(gmail.uid_fetch(message_id, 'rfc822').first.attr['rfc822']) , mail::mail.parse(gmail.uid_fetch(message_id, 'rfc822').first.attr['rfc822'])

thinking sort of drop-in replacement no avail.

yep, ran problem today.

here's solution used: saving attachments rails 3

in case, it'd be:

 mail.new(gmail.uid_fetch(message_id, 'rfc822').first.attr['rfc822']) 

Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -