SMTPSyntaxError with Action Mailer

I’ve been trying to get my action mailer powered form to work all day. I
can get it to work perfectly in development mode.
But when I run it in production mode I get an error, the log spits this
out

Net::SMTPSyntaxError (501 Syntax: HELO hostname
):
/usr/lib/ruby/1.8/net/smtp.rb:680:in check_response' /usr/lib/ruby/1.8/net/smtp.rb:653:ingetok’
/usr/lib/ruby/1.8/net/smtp.rb:623:in helo' /usr/lib/ruby/1.8/net/smtp.rb:401:indo_start’
/usr/lib/ruby/1.8/net/smtp.rb:378:in start' /usr/lib/ruby/1.8/net/smtp.rb:316:instart’
/usr/lib/ruby/gems/1.8/gems/actionmailer-1.1.5/lib/action_mailer/base.rb:436:in
perform_delivery_smtp' /usr/lib/ruby/gems/1.8/gems/actionmailer-1.1.5/lib/action_mailer/base.rb:327:insend’
/usr/lib/ruby/gems/1.8/gems/actionmailer-1.1.5/lib/action_mailer/base.rb:327:in
deliver!' /usr/lib/ruby/gems/1.8/gems/actionmailer-1.1.5/lib/action_mailer/base.rb:223:inmethod_missing’
/app/controllers/email_controller.rb:9:in message' /usr/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/base.rb:853:insend’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/base.rb:853:in
perform_action_without_filters' /usr/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/filters.rb:332:inperform_action_without_benchmark’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/benchmarking.rb:69:in
perform_action_without_rescue' /usr/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/benchmarking.rb:69:inmeasure’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/benchmarking.rb:69:in
perform_action_without_rescue' /usr/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/rescue.rb:82:inperform_action’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/base.rb:369:in
send' /usr/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/base.rb:369:inprocess_without_session_management_support’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/session_management.rb:116:in
process' /usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/dispatcher.rb:38:indispatch’
/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:141:in
process_request' /usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:53:inprocess!’
/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:52:in
each_cgi' /usr/lib/ruby/1.8/fcgi.rb:597:ineach’
/usr/lib/ruby/1.8/fcgi.rb:597:in each_cgi' /usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:52:inprocess!’
/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:22:in
`process!’
dispatch.fcgi:24

I looked into HELO and it seems to have something to do with the
hostname obviously but I cant see anything wrong with it.

my production.rb code is

ActionMailer::Base.server_settings = {
:address => “mail.pulsedev.net”,
:port => 25,
:domain => “pulsedev.net”,
:authentication => :login,
:user_name => “m9472838”,
:password => “sirius”,
}

Any help would be great thanks

Ben R. wrote:

Hi Alex ~

I am sure your issue is with configuration, but in the future I wouldn’t
advise posting one’s password.

~ Ben

Thanks but what configuration? the code for the production.rb or the
rest of it? It works fine in development mode so I dont see how it could
be that.

But on the other hand I’ve tried everything in production.rb.

Hi Alex ~

I am sure your issue is with configuration, but in the future I wouldn’t
advise posting one’s password.

~ Ben

I had this same problem and was able to get it to work by changing this
line in my production.rb file:

#config.action_mailer.raise_delivery_errors = false

Uncomment that line (which is the default in the development.rb) and it
should send emails - I consider this a workaround because I could not
determine the actual source of the error.

Dave

Thanks but what configuration? the code for the production.rb or the
rest of it? It works fine in development mode so I dont see how it could
be that.

If the mail gets sent in devel mode, your code is right. Are your
production and development hosts the same?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs