Wednesday, March 28, 2007

ActionMailer rocks!

Once I got past the 'out of date' situation, it turned out to be pretty easy: the main change in ActionMailer that I can see is that instance variables have been replaced with methods (seems to be lots of that happening in the Rails world, such as @session, @flash, etc... being upgraded to methods) and the handling of variables into the body method is more like other methods.

The biggest challenge was getting smtp operating on my windows machine. Thanks to a post on Ruby on rails: Talk (which I can no longer locate), I downloaded the free SMTP server from It was a quick download/install and the only tricky thing was configuring ActionMailer. What I used to get it running is the following, in config/development.rb:

ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.server_settings = {
:address => "",
:port => 25,
:domain => "localhost",

And... drum roll please: there is now built-in spam filtering on the Rails wiki... hooray! Many thanks to whoever made that happen :-)

No comments:

Post a Comment