Wednesday, November 13, 2013

Re: [Rails] Cannot receive from specified address Unauthenticated senders not allowed

On Nov 13, 2013, at 7:13 AM, Nishant Sharma <nishantsharma486@gmail.com> wrote:

> On trying to run a rake task via crontab, I'm getting the following error:
>
> rake aborted!
> 550 Cannot receive from specified address <help@xyz.com>: Unauthenticated senders not allowed

You should check that help@xyz.com is in fact authenticated — make sure ENV['SENDGRID_USER'] and ENV['SENDGRID_PASSWORD'] are indeed correctly set in your production environment prior to starting up Rails.



> /mnt/voylla-production/shared/bundle/ruby/1.9.1/gems/mail-2.3.3/lib/mail/network/delivery_methods/smtp.rb:129:in `block in deliver!'
> /mnt/voylla-production/shared/bundle/ruby/1.9.1/gems/mail-2.3.3/lib/mail/network/delivery_methods/smtp.rb:128:in `deliver!'
> /mnt/voylla-production/shared/bundle/ruby/1.9.1/gems/mail-2.3.3/lib/mail/message.rb:1989:in `do_delivery'
> /mnt/voylla-production/shared/bundle/ruby/1.9.1/gems/mail-2.3.3/lib/mail/message.rb:230:in `block in deliver'
> /mnt/voylla-production/shared/bundle/ruby/1.9.1/gems/actionmailer-3.1.10/lib/action_mailer/base.rb:432:in `block in deliver_mail'
> /mnt/voylla-production/shared/bundle/ruby/1.9.1/gems/activesupport-3.1.10/lib/active_support/notifications.rb:53:in `block in instrument'
> /mnt/voylla-production/shared/bundle/ruby/1.9.1/gems/activesupport-3.1.10/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
> /mnt/voylla-production/shared/bundle/ruby/1.9.1/gems/activesupport-3.1.10/lib/active_support/notifications.rb:53:in `instrument'
> /mnt/voylla-production/shared/bundle/ruby/1.9.1/gems/actionmailer-3.1.10/lib/action_mailer/base.rb:430:in `deliver_mail'
> /mnt/voylla-production/shared/bundle/ruby/1.9.1/gems/mail-2.3.3/lib/mail/message.rb:230:in `deliver'
> /mnt/voylla-production/releases/20131111011431/app/controllers/admin/order_query_controller.rb:255:in `send_last_2_days_orders'
> /mnt/voylla-production/releases/20131111011431/lib/tasks/env_setup.rake:116:in `block (2 levels) in <top (required)>'
> Tasks: TOP => maintenance:last_2_days_orders
> (See full trace by running task with --trace)
>
>
> My production.rb is:
>
> config.action_mailer.delivery_method = :smtp
> config.action_mailer.raise_delivery_errors = true
> config.force_ssl = false
> config.i18n.fallbacks = true
> config.active_support.deprecation = :notify
> config.action_mailer.default_url_options = {:host =>'xyz.com'}
> config.action_mailer.smtp_settings = {
> :address => 'smtp.sendgrid.net',
> :port => '587',
> :authentication => :plain,
> :user_name => ENV['SENDGRID_USERNAME'],
> :password => ENV['SENDGRID_PASSWORD'],
> :domain => 'xyz.com'
> }
> config.action_mailer.delivery_method = :smtp
> config.action_mailer.raise_delivery_errors = true
> config.action_mailer.default :from => "xyz Help <help@xyz.com>"
> config.mailer_sender = "xyz Help <help@xyz.com>"
> config.action_mailer.default_url_options = { :host => "xyz.com" }
>
>
> I've looked through similar posts, and I feel my production.rb is configured correctly. So, I'm not able to figure out what's the problem.
>
> Please could someone help. Thanks
>
> **EDIT:** Could changes in Gemfile.lock casue this? My Gemfile.lock got changed, although I had reverted the changes later. It worked fine earlier.=
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/eaabca66-6c76-412f-acb4-e23328fc1f3a%40googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/0DA9139A-2D9D-4FEF-8B8C-9BEE6D257138%40gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate