Topic: Do I need an SMTP server with ActionMailer?

I am new to emailing from Rails and my research indicates that ActionMailer does not need a separate smtp server to work. Is this true? If so, are there any advantages to using an smtp server? I was about to install Postfix but not if I don't need to.

I am using this guide Any other recommendations?

Last edited by markhorrocks (2011-08-14 23:08:01)

Re: Do I need an SMTP server with ActionMailer?

Well,  you do need an SMTP server.  Normally,  just to get things going,  I would recommend you use the SMTP server used by your email account if you have a paid for email service. 

You'd have to set it up in environments.rb,  in rails < 3.0, it looks like this:

  config.action_mailer.smtp_settings = {
    :address => '',  <<-- your SMTP server goes here
    :port => 3535,                                      <<-- may not be needed, depends on your account
    :domain => '',
    :authentication => :plain,
    :user_name => '',
    :password => 'markspassword'

If you don't have access to an SMTP server account, (i.e. you use gmail or some other free email account),  you can buy an SMTP account for very little money.  It's advisable to use a reputablle SMTP server account so that your email doesn't get flagged as SPAM when it's sent from your Rails server,  etc.   If you choose a 'shady' SMTP service,  it's likely used by SPAMers and your emails may suffer the wrath of anti-spam software.

Joe got a job, on the day shift, at the Utility Muffin Research Kitchen, arrogantly twisting the sterile canvas snout of a fully charged icing anointment utensil.

Re: Do I need an SMTP server with ActionMailer?

My domain host charges $32 a month for 1Gb emails. I will go with postfix as I have used it before. The option was sendmail but I need to redirect mail for my domain. I believe postfix may be better for that.

I am having trouble testing in development as (oz provider) seems to block port 25.