It's possible, depending on the type of email account, and can be done
without relying on an external application. Check into the net/pop3
and net/imap core libraries.

http://www.ruby-doc.org/core/classes/Net/POP3.html
http://www.ruby-doc.org/core/classes/Net/IMAP.html

The examples for either are good starting points.