# Ruby Email handling / TMail / ActionMailer

**URL:** <https://www.ruby-forum.com/t/ruby-email-handling-tmail-actionmailer/51471>\
**Category:** Ruby\
**Created:** [December 1, 2005, 10:31am UTC](https://www.ruby-forum.com/t/ruby-email-handling-tmail-actionmailer/51471 "2005-12-01T10:31:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![chrisjroos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/43a26b/32.png) [@chrisjroos](https://www.ruby-forum.com/u/chrisjroos)\
**Post date:** [December 1, 2005, 10:31am UTC](https://www.ruby-forum.com/t/ruby-email-handling-tmail-actionmailer/51471/1 "2005-12-01T10:31:03Z")

</div>

Hi,

I’ve used TMail in the past, mainly in conjunction with ActionMailer.

I now need email parsing outside of rails and don’t really need  
ActionMailer. I know there have been changes to the TMail source that  
is included in ActionMailer. I don’t think that these changes have  
been fed back into standard TMail itself. If I wanted to use the  
latest TMail outside of rails, should I just include ActionMailer gem  
and use TMail from there or use the standalone version from  
[i.loveruby.net](http://i.loveruby.net)?

Alternatively, I know there are a few other mail parsing libs for Ruby.  
Can anyone suggest a good alternative?

Thanks in advance,

Chris

---

<div class="post-metadata">

**Author:** ![chrisjroos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/43a26b/32.png) [@chrisjroos](https://www.ruby-forum.com/u/chrisjroos)\
**Post date:** [February 19, 2009, 5:48am UTC](https://www.ruby-forum.com/t/ruby-email-handling-tmail-actionmailer/51471/2 "2009-02-19T05:48:56Z")

</div>

Hi,  
I am trobling wit an email problem for getting my messages.I have  
to retrieve my attachements from my inbox messages.i dint’ get a  
solution yet.can you plz give me a solution to me.I got "Running Mail  
Importer…  
execution expired  
Finished Mail Importer " error.

my code is

require “rubygems”  
require ‘net/pop’

def index

puts “Running Mail Importer…”  
begin  
if Net::POP3.start(“[pop.gmail.com](http://pop.gmail.com)”, nil, “removed\_email\_address@domain.invalid”,  
“password”)  
Net::POP3.start(“[pop.gmail.com](http://pop.gmail.com)”, nil, “removed\_email\_address@domain.invalid”,  
“password”) do |pop|  
puts “After…”  
if pop.mails.empty?  
puts “NO MAIL”  
else  
pop.mails.each do |email|  
begin  
puts “receiving mail…”  
Notifier.receive(email.pop)  
email.delete  
rescue Exception =\> e  
puts "Error receiving email at " + Time.now.to\_s + "::: " +  
e.message  
end  
end  
end  
end  
else  
puts “Not Connecting…”  
end  
rescue Exception =\> e  
puts e  
end

puts “Finished Mail Importer.”

end
