Forum: Ruby on Rails SMTPSyntaxError with Action Mailer

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Alexander P. (Guest)
on 2006-01-24 23:09
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:in `getok'
    /usr/lib/ruby/1.8/net/smtp.rb:623:in `helo'
    /usr/lib/ruby/1.8/net/smtp.rb:401:in `do_start'
    /usr/lib/ruby/1.8/net/smtp.rb:378:in `start'
    /usr/lib/ruby/1.8/net/smtp.rb:316:in `start'
    /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:in
`send'
    /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:in
`method_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:in
`send'
    /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:in
`perform_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:in
`measure'
    /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:in
`perform_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:in
`process_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:in
`dispatch'
    /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:in
`process!'
    /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:in `each'
    /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:in
`process!'
    /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. (Guest)
on 2006-01-24 23:14
(Received via mailing list)
Hi Alex ~

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

~ Ben
Alexander P. (Guest)
on 2006-01-24 23:22
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.
Juan Lupión (Guest)
on 2006-01-25 08:40
(Received via mailing list)
> 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?

--
Dave Sohigian (Guest)
on 2006-02-01 21:20
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
This topic is locked and can not be replied to.