Search
 
SCRIPT & CODE EXAMPLE
 

RUBY

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
Comment

PREVIOUS NEXT
Code Example
Ruby :: times ruby 
Ruby :: ruby loop through array 
Ruby :: rails generate rake task 
Ruby :: ruby class 
Ruby :: ruby each do method 
Ruby :: read xls file in ruby 
Ruby :: rails faker 
Ruby :: see migration history rails 
Ruby :: ruby list of files in directory include subfolders 
Ruby :: pg_ctl: no database directory specified and environment variable PGDATA unset 
Ruby :: rails get random record 
Ruby :: arel_table rails 
Ruby :: generate dates using period rails 
Ruby :: ruby on rails scaffold generator example with belongs to relationship 
Ruby :: including libraries in ruby 
Ruby :: ruby includes 
Ruby :: rails migration populate data 
Ruby :: online ruby compiler 
Ruby :: ruby puts inspect 
Ruby :: run bundle without production in rails 
Ruby :: how to write an array in ruby 
Ruby :: ruby create object with attributes 
Ruby :: rails-react syntax error jsx not enabled 
Ruby :: add key and value to the beginning of a hash ruby 
Ruby :: replace strring by another string ruby 
R :: R string ascii accents 
R :: suppress error r 
R :: r dataframe column factor 
R :: reverse string in r 
R :: copy a dataframe in r 
ADD CONTENT
Topic
Content
Source link
Name
9+9 =