Topic: Can't use send_later with delayed_job plugin.


I've installed the delayed_job plugin, and I'm trying to use the send_later method (e.g.: AccountMailer.send_later(:deliver_welcome, but I keep getting this error in the last_error column of the job table:

530-5.5.1 Authentication Required. Learn more at                    

/usr/local/lib/ruby/1.8/net/smtp.rb:930:in `check_response'
/usr/local/lib/ruby/1.8/net/smtp.rb:899:in `getok'
/usr/local/lib/ruby/1.8/net/smtp.rb:828:in `mailfrom'

Even though I have it set up correctly in environment.rb (and sending mail regularly works fine):

require 'smtp_tls'
ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.smtp_settings = {
  :address => "",
  :port => "587",
  :domain => "localhost.localdomain",
  :authentication => :plain,
  :user_name => '...',
  :password => '...'

Can anyone help? Thank you!

Re: Can't use send_later with delayed_job plugin.

Hi cy-ro,

My smtp_settings also have:

:enable_starttls_auto => true

Also, I've found it difficult to diagnose failures in delayed_job.  Usually I just open a rails console and test the mailer manually:


Not sure if this helps but it may be something.