Sha256: 0971b7d6e3578a1d604b08efa8d003d1d9624c55eb7b2805c1c7a9a78e6e8147

Contents?: true

Size: 1.18 KB

Versions: 48

Compression:

Stored size: 1.18 KB

Contents

module Incline

  ##
  # This mailer is used for the account activation, password reset, and invalid password reset messages.
  #
  class UserMailer < ::Incline::ApplicationMailerBase

    ##
    # Sends the activation email to a new user.
    def account_activation(data = {})
      @data = {
          user: nil,
          client_ip: '0.0.0.0'
      }.merge(data || {})
      raise unless data[:user]
      mail to: data[:user].email, subject: 'Account activation'
    end

    ##
    # Sends the password reset email to an existing user.
    def password_reset(data = {})
      @data = {
          user: nil,
          client_ip: '0.0.0.0'
      }.merge(data || {})
      raise unless data[:user]
      mail to: data[:user].email, subject: 'Password reset request'
    end

    ##
    # Sends an invalid password reset attempt message to a user whether they exist or not.
    def invalid_password_reset(data = {})
      @data = {
          email: nil,
          message: 'This email address is not associated with an existing account.',
          client_ip: '0.0.0.0'
      }.merge(data || {})
      raise unless data[:email]
      mail to: data[:email], subject: 'Password reset request'
    end

  end

end

Version data entries

48 entries across 48 versions & 1 rubygems

Version Path
incline-0.3.14 app/mailers/incline/user_mailer.rb
incline-0.3.13 app/mailers/incline/user_mailer.rb
incline-0.3.12 app/mailers/incline/user_mailer.rb
incline-0.3.11 app/mailers/incline/user_mailer.rb
incline-0.3.10 app/mailers/incline/user_mailer.rb
incline-0.3.9 app/mailers/incline/user_mailer.rb
incline-0.3.8 app/mailers/incline/user_mailer.rb
incline-0.3.7 app/mailers/incline/user_mailer.rb
incline-0.3.6 app/mailers/incline/user_mailer.rb
incline-0.3.5 app/mailers/incline/user_mailer.rb
incline-0.3.4 app/mailers/incline/user_mailer.rb
incline-0.3.3 app/mailers/incline/user_mailer.rb
incline-0.3.2 app/mailers/incline/user_mailer.rb
incline-0.3.1 app/mailers/incline/user_mailer.rb
incline-0.3.0 app/mailers/incline/user_mailer.rb
incline-0.2.36 app/mailers/incline/user_mailer.rb
incline-0.2.35 app/mailers/incline/user_mailer.rb
incline-0.2.34 app/mailers/incline/user_mailer.rb
incline-0.2.28 app/mailers/incline/user_mailer.rb
incline-0.2.27 app/mailers/incline/user_mailer.rb