From: Erika Date: 2008-12-09T18:20:55+09:00 Subject: pop3 body email --0-1137586136-1228814851=:51655 Content-Type: text/plain; charset=us-ascii Hi, I have to check the body of the email which is a html code, like the following: Text1: Text2 I have to check that for "Text1" what "Text2" is shown, which can vary for different reasons. I managed to get the emails, to check the subject of the email to identify the correct email, but I can't get to resolve this problem which I mentioned previously. Thank you, Erika require 'net/pop' pop = Net::POP3.new('smtp server name') pop.start('user', 'parola') if pop.mails.empty? puts 'No mail.' else i = 0 pop.each_mail do |m| sbj=m.header.split("\r\n").grep(/^Subject:/) rate=m.pop.grep(/^Test1/) puts sbj puts m.pop i += 1 end puts "#{pop.mails.size} mails popped." end pop.finish --0-1137586136-1228814851=:51655--