Net::SMTPSyntaxError (504..)


#1

Hi
Group members
I am trying to send e-mail through emailer
and gettong this error ->

Net::SMTPSyntaxError (504 5.5.4 Encryption required for requested
authentication mechanism
):
/usr/lib/ruby/1.8/net/smtp.rb:680:in check_response' /usr/lib/ruby/1.8/net/smtp.rb:582:inauth_login’
/usr/lib/ruby/1.8/net/smtp.rb:686:in critical' /usr/lib/ruby/1.8/net/smtp.rb:581:inauth_login’
/usr/lib/ruby/1.8/net/smtp.rb:571:in __send__' /usr/lib/ruby/1.8/net/smtp.rb:571:inauthenticate’
/usr/lib/ruby/1.8/net/smtp.rb:411:in do_start' /usr/lib/ruby/1.8/net/smtp.rb:378:instart’
/usr/lib/ruby/1.8/net/smtp.rb:316:in start' /usr/lib/ruby/gems/1.8/gems/actionmailer-2.1.2/lib/action_mailer/ base.rb:628:inperform_delivery_smtp’
/usr/lib/ruby/gems/1.8/gems/actionmailer-2.1.2/lib/action_mailer/
base.rb:508:in __send__' /usr/lib/ruby/gems/1.8/gems/actionmailer-2.1.2/lib/action_mailer/ base.rb:508:indeliver!’
/usr/lib/ruby/gems/1.8/gems/actionmailer-2.1.2/lib/action_mailer/
base.rb:383:in method_missing' /app/models/user_observer.rb:3:inafter_create’
/usr/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/
observer.rb:171:in send' /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/ observer.rb:171:inupdate’
/usr/lib/ruby/1.8/observer.rb:185:in notify_observers' /usr/lib/ruby/1.8/observer.rb:184:ineach’
/usr/lib/ruby/1.8/observer.rb:184:in notify_observers' /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/ callbacks.rb:309:innotify’
/usr/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/
callbacks.rb:296:in callback' /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/ callbacks.rb:221:increate_without_timestamps’
/usr/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/
timestamp.rb:29:in create' /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/ base.rb:2483:increate_or_update_without_callbacks’
/usr/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/
callbacks.rb:207:in create_or_update' /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/ base.rb:2211:insave_without_validation’
/usr/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/
validations.rb:911:in save_without_dirty' /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/ dirty.rb:75:insave_without_transactions’
/usr/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/
transactions.rb:106:in save' /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/ connection_adapters/abstract/database_statements.rb:66:intransaction’
/usr/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/
transactions.rb:79:in transaction' /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/ transactions.rb:98:intransaction’
/usr/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/
transactions.rb:106:in save' /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/ transactions.rb:118:inrollback_active_record_state!’
/usr/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/
transactions.rb:106:in save' /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/ validations.rb:932:inupdate_attribute’
/vendor/plugins/acts_as_state_machine/lib/acts_as_state_machine.rb:
61:in perform' /vendor/plugins/acts_as_state_machine/lib/acts_as_state_machine.rb: 94:infire’
/vendor/plugins/acts_as_state_machine/lib/acts_as_state_machine.rb:
93:in each' /vendor/plugins/acts_as_state_machine/lib/acts_as_state_machine.rb: 93:infire’
/vendor/plugins/acts_as_state_machine/lib/acts_as_state_machine.rb:
201:in register!' /app/controllers/users_controller.rb:52:increate’
/usr/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/
base.rb:1166:in send' /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/ base.rb:1166:inperform_action_without_filters’
/usr/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/
filters.rb:579:in call_filters' /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/ filters.rb:572:inperform_action_without_benchmark’
/usr/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/
benchmarking.rb:68:in perform_action_without_rescue' /usr/lib/ruby/1.8/benchmark.rb:293:inmeasure’
/usr/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/
benchmarking.rb:68:in perform_action_without_rescue' /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/ rescue.rb:201:inperform_action_without_caching’
/usr/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/
caching/sql_cache.rb:13:in passenger_orig_perform_action' /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/ connection_adapters/abstract/query_cache.rb:33:incache’
/usr/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/
query_cache.rb:8:in cache' /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/ caching/sql_cache.rb:12:inpassenger_orig_perform_action’
/opt/passenger-2.0.6/lib/passenger/railz/request_handler.rb:53:in
perform_action' /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/ base.rb:529:insend’
/usr/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/
base.rb:529:in process_without_filters' /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/ filters.rb:568:inprocess_without_session_management_support’
/usr/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/
session_management.rb:130:in process' /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/ base.rb:389:inprocess’
/usr/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/
dispatcher.rb:149:in handle_request' /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/ dispatcher.rb:107:indispatch’
/usr/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/
dispatcher.rb:104:in synchronize' /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/ dispatcher.rb:104:indispatch’
/usr/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/
dispatcher.rb:120:in dispatch_cgi' /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/ dispatcher.rb:35:indispatch’
/opt/passenger-2.0.6/lib/passenger/railz/request_handler.rb:38:in
process_request' /opt/passenger-2.0.6/lib/passenger/abstract_request_handler.rb: 165:inmain_loop’
/opt/passenger-2.0.6/lib/passenger/railz/application_spawner.rb:
321:in start_request_handler' /opt/passenger-2.0.6/lib/passenger/railz/application_spawner.rb: 282:inhandle_spawn_application’
/opt/passenger-2.0.6/lib/passenger/utils.rb:163:in safe_fork' /opt/passenger-2.0.6/lib/passenger/utils.rb:161:infork’
/opt/passenger-2.0.6/lib/passenger/utils.rb:161:in safe_fork' /opt/passenger-2.0.6/lib/passenger/railz/application_spawner.rb: 280:inhandle_spawn_application’
/opt/passenger-2.0.6/lib/passenger/utils.rb:163:in safe_fork' /opt/passenger-2.0.6/lib/passenger/utils.rb:161:infork’
/opt/passenger-2.0.6/lib/passenger/utils.rb:161:in safe_fork' /opt/passenger-2.0.6/lib/passenger/railz/application_spawner.rb: 279:inhandle_spawn_application’
/opt/passenger-2.0.6/lib/passenger/abstract_server.rb:317:in
__send__' /opt/passenger-2.0.6/lib/passenger/abstract_server.rb:317:inmain_loop’
/opt/passenger-2.0.6/lib/passenger/abstract_server.rb:168:in
start_synchronously' /opt/passenger-2.0.6/lib/passenger/abstract_server.rb:135:instart’
/opt/passenger-2.0.6/lib/passenger/abstract_server.rb:112:in
fork' /opt/passenger-2.0.6/lib/passenger/abstract_server.rb:112:instart’
/opt/passenger-2.0.6/lib/passenger/railz/application_spawner.rb:
179:in start' /opt/passenger-2.0.6/lib/passenger/railz/framework_spawner.rb: 270:inhandle_spawn_application’
/opt/passenger-2.0.6/lib/passenger/railz/framework_spawner.rb:
263:in synchronize' /opt/passenger-2.0.6/lib/passenger/railz/framework_spawner.rb: 263:inhandle_spawn_application’
/opt/passenger-2.0.6/lib/passenger/abstract_server.rb:317:in
__send__' /opt/passenger-2.0.6/lib/passenger/abstract_server.rb:317:inmain_loop’
/opt/passenger-2.0.6/lib/passenger/abstract_server.rb:168:in
start_synchronously' /opt/passenger-2.0.6/lib/passenger/abstract_server.rb:135:instart’
/opt/passenger-2.0.6/lib/passenger/abstract_server.rb:112:in
fork' /opt/passenger-2.0.6/lib/passenger/abstract_server.rb:112:instart’
/opt/passenger-2.0.6/lib/passenger/railz/framework_spawner.rb:
87:in start' /opt/passenger-2.0.6/lib/passenger/spawn_manager.rb:222:inspawn_rails_application’
/opt/passenger-2.0.6/lib/passenger/spawn_manager.rb:217:in
synchronize' /opt/passenger-2.0.6/lib/passenger/spawn_manager.rb:217:inspawn_rails_application’
/opt/passenger-2.0.6/lib/passenger/spawn_manager.rb:126:in
spawn_application' /opt/passenger-2.0.6/lib/passenger/spawn_manager.rb:251:inhandle_spawn_application’
/opt/passenger-2.0.6/lib/passenger/abstract_server.rb:317:in
__send__' /opt/passenger-2.0.6/lib/passenger/abstract_server.rb:317:inmain_loop’
/opt/passenger-2.0.6/lib/passenger/abstract_server.rb:168:in
`start_synchronously’
/opt/passenger-2.0.6/bin/passenger-spawn-server:46

My environment.db looks like this->
ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.smtp_settings = {
:address => ‘abc.xyz.net’,
:port => 25,
:authentication => :login, # Don’t change this one.
:domain => “xyz.net”,
:user_name => “removed_email_address@domain.invalid”,
:password => “xyz.1234”
}
ActionMailer::Base.perform_deliveries = true
ActionMailer::Base.raise_delivery_errors = true
ActionMailer::Base.default_charset = “utf-8”

Any idea on this error?
Any suggestion will nicely be appreciated.
DJ


#2

Hello DJ,

try:

ActionMailer::Base.smtp_settings = {


:user_name => “u…”,

}

NOTE: just the username portion of the address, no @ or domain.

Rick