Getting Rails to send email

I have a site that I want to send out emails for when people forget their password. I've read the various articles on how to get Rails to send emails but what I need is how to set up the software to allow emails to be sent at all. I once say an article that covered setting up exim / postfix but can't find it anymore. Does anyone know what packages I need to install and how I might configure them or some pointers to where I can find this out?

I am running debian 4.0

Thanks

Hi Hickman,

Check out the documentation in rails.info this is the default module for Rails.

I am using ruport(Ruby reports) to send email

gem install ruport gem install ruport-util

require 'rubygems' require 'ruport' require 'ruport/util'

r = Ruport::Report.new r.add_mailer :default, :host => "localhost", :address => "xxx@xxx.com" r.send_to(email_id) do |mail|    mail.subject = "Some subject"    mail.text = "Some text"    mail.html = "<h1>Hello World</h1>" end

For further info. check ruport documentation

Regards, Vimal Das

No quite what I was looking for. I have seen plenty of documentation as to how to send mail from Ruby but they all assume that you have an MTA like sendmail, postfix or exim4 already set up. The machine that I have has neither installed or, obviously, configured.

I was thinking that this is the sort of problem that others must have encountered before and perhaps they could shed some light on what I should be looking for.

Thanks anyway

Hi Peter,

answering this question is out of the scope of this mailing list. You will find plenty of mail server installation guides via your favorite search enginee - or you can you existing mail accounts (see guides.rails.info).

Regards

Nicolai

Hey Peter,

Nicolai is correct, this isn't really the right place for this kind of question. However, because I have recently setup a Postfix mail agent on Slicehost, I might be able to help you. Their documentation is actually really good. Additionally, if you just need outgoing mail (like sending emails to admin), then you probably won't even have to configure ActionMailer (the default settings should work).

Check out the docs and if you are still having trouble, shoot me an email. http://articles.slicehost.com/2008/7/29/postfix-installation

HTH, Jason Arora