R
Robert Johns
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:OP3.enable_ssl(OpenSSL::SSL::VERIFY_NONE)
Net:OP3.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
email.
require 'net/pop'
require 'rubygems'
require 'tmail'
username = ' '
pass = ' '
Net:OP3.enable_ssl(OpenSSL::SSL::VERIFY_NONE)
Net:OP3.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