Mail, TMail, The Future of Ruby Email Handling
Thu Sep 17 11:29:43 -0700 2009
You may know I maintain the TMail library. Well, recently I’ve been working on the next version.
TMail was getting hard to maintain and monkey patch. It’s implementation does not take into account many little things that create a problem when trying to get Ruby 1.9 compatibility working.
Anyway, I started working on Mail… code speaks louder than words… so Mail can do the following right now:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
Mail.defaults do smtp '127.0.0.1' end Mail.deliver do to 'nicolas@test.lindsaar.net.au' from 'Mikel Lindsaar <mikel@test.lindsaar.net.au>' subject 'First multipart email sent with Mail' text_part do body 'Here is the attachment you wanted' end html_part do content_type 'text/html; charset=UTF-8' body '<h1>Funky Title</h1><p>Here it is</p>' end add_file :filename => '/path/to/myfile.pdf' end |
And you just sent a multipart text and html email with an attachment!
Mail is my attempt to just HANDLE the problem of Ruby Email handling.
I developed it from the ground up with complete spec coverage… I am not quite at 100%... but very close. It is also a completely object oriented design and pure ruby too!
Mail tries it’s darn hardest not to crash. In fact it already checks every email in the TMail test suite and doesn’t crash once on parsing any of the emails in there.
In any case, I now have pretty much all the basic email and mime and attachment handlings working. Next up is handling multiple character sets in the header and body.
You are welcome to check it out from my GitHub account
It’s version 0.1 right now… but expect to see the multi character set support soon.
Forks and patches welcome!
Mikel
Leave a Reply
Latest posts
- Encrypting Another Partition Using FileVault 2 on OSX Lion
- Installing Home Folder on Second Drive on OSX Lion
- undefined local variable or method `version_requirements'
- A New World of Resources
- Rails Static Pages
- Twitter Replacing Rails? So?
- Engine Yard Cloud Backups Generating Zero Length Backups
- Our Rails Rumble Entry - StillAlive.com
- Renaming a controller and redirection in Rails 3
- Updating RailsPlugins.org to Rails 3 - Part 1
- A new protocol for social interaction
- What is a distributed social network?
- Bundler and Public Git Sources
- Getting Heroku, memcached and Rails 3 working
- Why Bundler?
- Rails Commit Access
- Introducing TellThemWhen
- rake RSpec & Cucumber uninitialized constant Rails::Boot::Bundler
- This Relationship is Worth Nothing
- Thank YOU...
- Inline Attachments for ActionMailer
- Upgrading RailsPlugins.org to Rails 3 - Part 1
- Stripping dollar signs and commas from a string
- Getting Rails 3 Edge with jQuery, RSpec and Cucumber using RVM
- Action Mailer, go Proc thyself
- The Real News Donation Drive
- ActionMailer ScreenCast and Article
- Installing RSpec for Rails 3
- I am speaking at RailsConf 2010
- Rails 3 Session Secret and Session Store
- If you're lazy and you know it write your specs!
- Bundler - uninitialized constant ActionController
- Bundle Me Some Sanity
- How to use Mail / ActionMailer 3 with GMail SMTP
- Put your mailer where the action is!
- Why Force a Choice?
- How to make an RSS feed in Rails
- Rails 3 Routing with Rack
- Bundle me some Rails
- Helping out in Haiti
- Watch your self
- Is Rails 3.0 a Game Changer?
- Where did the scripts go?
- validates :rails_3, :awesome => true
- New Rails Version 3.0 Guides Online
- New ActionMailer API in Rails 3.0
- Mail gem version 2 released
- How to rename a Rails 3 Application
- Rails 3.0 Examples
- DECCA Driving Day
Latest comments
- Quantspring.com
This is a really great post I f...
- Maxine
Maybe it has a connection with ...
- Axel W
Had the same problem lots of ti...
- cloud computing anbieter
I was there and I see you confe...
- cloud computing anbieter
I was there and I see you confe...
Categories
Tag Cloud
AJAX ARGH! ActiveRecord Ajax Apache Apple Asterisk Australia Copy Database Development Feedburner Gem server Google Human Rights Javascript L. Ron Hubbard MS SQL Server MacOSX Mail Mephisto Not Programming OpenBSD Opensource Performance Personal Integrity PostgreSQL Programming Prototype Puzzle RDoc REST RESTful Rails RSPec RSpec Rails Rails Tips Rspec Ruby Ruby on Rails Ruby on Rails Tips Ruby on rails Tips SQL SQLServer SVN Scientologist Scientology Site Stats Soekris Soekris net5501 TMail Textmate Tips Windows World about mikel anti drug apache contributing daemon documentation drugs illustrator javascript lambda mail mephisto newspapers nitro open source opensource photoshop productivity programming railscasts rspec ruby ruby on rails rubyforge scientology seo sitemap sqlserver tips tmail tom cruise unix tricks vector graphicsArchives
- November 2009 (1)
- October 2009 (2)
- September 2009 (2)
- August 2009 (0)
- July 2009 (1)
- June 2009 (0)
- May 2009 (1)
- April 2009 (0)
- March 2009 (0)
- February 2009 (0)
- January 2009 (2)
- December 2008 (0)
- November 2008 (5)
- October 2008 (0)
- September 2008 (1)
- August 2008 (0)
- July 2008 (2)
- June 2008 (13)
- May 2008 (7)
- April 2008 (18)
- March 2008 (8)
- February 2008 (5)
- January 2008 (7)
- December 2007 (20)
- November 2007 (22)




Wed May 02 00:14:52 -0700 2012
Bestech believes that it has an edge in the field of Real Estate Development because the group has the combined strength of conceptualization with 100% implementation and delivery.
bestech park view ananda
Wed May 02 00:48:25 -0700 2012
Bestech believes that it has an edge in the field of Real Estate Development because the group has the combined strength of conceptualization with 100% implementation and delivery.
bestech park view ananda
Wed May 02 00:15:06 -0700 2012
Bestech believes that it has an edge in the field of Real Estate Development because the group has the combined strength of conceptualization with 100% implementation and delivery.
bestech park view ananda
Tue Sep 22 16:32:47 -0700 2009
After struggling with TMail in my current Rails app I would appreciate it very much to have a modern Mail gem.
But please, don’t forget the old TMail gem until it’s fully replaced by Mail. I tried to install the TMail gem from github without luck. I have described the issue here: http://github.com/mikel/tmail/issues#issue/4
It seems it’s not easy to use the current fixes of TMail and replace the embedded gem of ActionMailer.
Tue Nov 08 19:59:09 -0800 2011
After struggling with TMail in my current Rails app I would appreciate it very much to have a modern Mail gem.
Thu Dec 22 18:38:01 -0800 2011
speaking of bounced emails, does your email mikel(@)this domain work? I found a minor css problem on the code snippets not rendering properly on Windows, Google Chrome (eek) need to change line-height from 99% to 100% qqyjivwk sr jobhmtzi jy rwzfjrwf te zakxxbnsv
Sun Dec 25 21:28:28 -0800 2011
Great code for implementing Ruby email handling. Bible Study Lessons by T.O.D. Johnston
Tue Dec 27 19:25:08 -0800 2011
This is great tutorial for handling RUBY email and your suggestions is very easy to follow. grand rapids djs
Fri Dec 30 15:46:57 -0800 2011
This has made it very easy to use RUBY’s email platform.
how to seo yourself
Mon Jan 09 13:45:51 -0800 2012
I like using RUBY email cuba explorer tours because its so easy to use wherever I go
Sun Jan 22 00:49:52 -0800 2012
There are plenty of information about this topic in the net & some are definitely better than others.
Sun Mar 11 00:22:55 -0800 2012
Ruby email are excellent email platform because its stable and quick baseball field covers
Tue Mar 13 12:42:18 -0700 2012
Ruby email is very stable and that is the reason that a lot of people like using it baseball field covers
Fri Mar 30 21:53:24 -0700 2012
Ruby is a great coding language to learn because its very flexible and easy to use Vitalzym
Thu Apr 05 19:27:39 -0700 2012
Do you think that the email with Ruby interface is stable compare to other platforms that are available today proxy server
Fri Apr 20 22:29:40 -0700 2012
I have been using this code for a couple of years now and I have to say that its very stable and easy to use Travel Insurance Singapore