Configuring Java Email Server for use with Rails
July 1, 2007 Leave a comment
Configuring Java Email Server for use with Rails is easy, it’s pretty straight forward and simple.
Step 1: Install Java Email Server.
Step 2: Edit your development.rb like this :
config.action_mailer.delivery_method = :smtp
config.action_mailer.raise_delivery_errors = true
config.action_mailer.server_settings = {
:address => "sazwqa@localhost" ,
:port => 25,
:domain => "localhost" ,
:authentication => :login,
:user_name => "sazwqa" ,
:password => "******"
}
Step 3: Test your app ! voila, it runs !!!
Edit: I found that it proved to be a hit and trial method to configure rails for use with Java Mail Server, so I do suggest you do try a various settings before panicking, like in my case I wasn’t able to use the settings above on the same PC again, so I simply removed all the settings , leaving the conf like this:
config.action_mailer.delivery_method = :smtp config.action_mailer.raise_delivery_errors = true
and voila, it ran !