Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!talisker.lacave.net!lacave.net!not-for-mail From: Robert Johns Newsgroups: comp.lang.ruby Subject: Email Parsing Date: Thu, 12 May 2011 15:28:25 -0500 Organization: Service de news de lacave.net Lines: 28 Message-ID: NNTP-Posting-Host: bristol.highgroove.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: talisker.lacave.net 1305232315 12922 65.111.164.187 (12 May 2011 20:31:55 GMT) X-Complaints-To: abuse@lacave.net NNTP-Posting-Date: Thu, 12 May 2011 20:31:55 +0000 (UTC) X-Received-From: This message has been automatically forwarded from the ruby-talk mailing list by a gateway at comp.lang.ruby. If it is SPAM, it did not originate at comp.lang.ruby. Please report the original sender, and not us. Thanks! For more details about this gateway, please visit: http://blog.grayproductions.net/categories/the_gateway X-Mail-Count: 383140 X-Ml-Name: ruby-talk X-Rubymirror: Yes X-Ruby-Talk: Xref: x330-a1.tempe.blueboxinc.net comp.lang.ruby:4428 How would I only pull links from the email's body and not the full email. require 'net/pop' require 'rubygems' require 'tmail' username = ' ' pass = ' ' Net::POP3.enable_ssl(OpenSSL::SSL::VERIFY_NONE) Net::POP3.start('pop.gmail.com', 995, username, pass) do |pop| if pop.mails.empty? puts "No mail" else pop.each_mail do |mail| email = TMail::Mail.parse(mail.pop) p email.body end end end Thanks -- Posted via http://www.ruby-forum.com/.