I am trying to read my gmail inbox using the mail gem. I am able to get the message array using Mail.last
.
Now I want to READ this message. The documentation says--
ail = Mail.read('/path/to/message.eml')
mail.envelope.from #=> 'mikel@test.lindsaar.net'
mail.from.addresses #=> ['mikel@test.lindsaar.net', 'ada@test.lindsaar.net']
mail.sender.address #=> 'mikel@test.lindsaar.net'
mail.to #=> 'bob@test.lindsaar.net'
mail.cc #=> 'sam@test.lindsaar.net'
mail.subject #=> "This is the subject"
mail.date.to_s #=> '21 Nov 1997 09:55:06 -0600'
mail.message_id #=> '<4D6AA7EB.6490534@xxx.xxx>'
mail.body.decoded #=> 'This is the body of the email...
Now, the problem remailns - what is /path/to/message/eml
?
How do i create/locate this EML file?
Thanks.