Ich versuche, eine E-Mail an den Administrator von der Produktionsumgebung, zu senden, aber andernfalls zu ... Es in Entwicklung arbeitet mit letter opener gem
, aber wenn ich in der Produktion versuchen, ich bin immer der folgende Fehler:Admin-Benachrichtigung E-Mail-Ausfall
Net::SMTPAuthenticationError (530-5.5.1 Authentication Required. Learn more at app/controllers/contact_us_controller.rb:8:in `submit_form'
app/models/contact_form.rb:13:in `send_admin_notification'
Mein Code für die submit_form Aktion in der Steuerung ist:
def submit_form
@contact_form.attributes = contact_form_params
return redirect_to action: :thanks if @contact_form.save
render :index
end
ein d der Code in der CONTACT_FORM Modell ist:
def send_admin_notification
AdminNotifier.contact_form(self).deliver_now
end
Ich habe für die letzten 2 Tage kämpfen mit diesem so dass jede Hilfe und Anleitung wäre viel zu schätzen
Haben Sie die SMTP-Einstellungen für die Produktion konfiguriert? http://guides.rubyonrails.org/configuring.html#configuring-action-mailer – max
http://guides.rubyonrails.org/action_mailer_basics.html#action-mailer-configuration – max