localhost · mail server · Rails

Configuring Java Email Server for use with Rails

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 !

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s