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.
:from, I suppose. - D-side