Answers for "rails exception email"

0

rails catch mail error

begin
        UserMailer.welcome_email(@user).deliver
        flash[:success] = "#{@user.name} created"
      rescue Net::SMTPAuthenticationError, Net::SMTPServerBusy, Net::SMTPSyntaxError, Net::SMTPFatalError, Net::SMTPUnknownError => e
        flash[:success] = "Utente #{@user.name} creato. Problems sending mail"
      end
Posted by: Guest on June-16-2020

Browse Popular Code Answers by Language