There is a customized devise, account confirmation emails, password recovery are sent. There is a "normal" letter that was normally sent before installing devise ʻa:

class ServiceMailer < ApplicationMailer default :from => 'notify@mysite.com' def notify_record(service_mail, record) @record = record mail(to: service_mail, subject: 'Новая запись') end end class RecordsController < InheritedResources::Base respond_to :json protect_from_forgery :except => :create def create # pp params r = Record.create(:name => params[:fio], :phone => params[:phone], :date => params[:date], :job_id => params[:job], :address_id => params[:address]) ServiceMailer.notify_record( Service.joins(:addresses).where(:addresses => {:id => params[:address]}).first.email, r ).deliver_now render :json => {}, :status => 200 end end 

But now I get the error:

 Net::SMTPFatalError (553 5.7.1 Sender address rejected: not owned by auth user 

What else needs to be configured to work?

Update Locally this all works, the problem is observed only on the server.

Update 2 Answer found: When installing and configuring the device, the account from which the letter was sent was changed, and from from remained old.

Closed due to the fact that off-topic participants cheops , D-side , user194374, pavel , aleksandr barakin 10 Aug '16 at 7:36 .

It seems that this question does not correspond to the subject of the site. Those who voted to close it indicated the following reason:

  • "The question is caused by a problem that is no longer reproduced or typed . Although similar questions may be relevant on this site, solving this question is unlikely to help future visitors. You can usually avoid similar questions by writing and researching a minimum program to reproduce the problem before publishing the question. " - cheops, D-side, Community spirit, pavel, aleksandr barakin
If the question can be reformulated according to the rules set out in the certificate , edit it .

  • It seems that your SMTP server does not agree to send on behalf of the specified address, since it is not yours for the account. The one in :from , I suppose. - D-side
  • @ D-side, I tried replacing "default: from => 'notify@mysite.com'" with "default: from => 'support@mysite.com'", with such from sends letters to devise, but not this letter. The problem is observed only on the server. - Tiazar
  • I mean, Devise and Rails are most likely not doing anything at all, find out with your email service what is wrong. Because it is he who refuses to serve you. - D-side

0