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.2.26 app/mailers/incline/user_mailer.rb
incline-0.2.25 app/mailers/incline/user_mailer.rb
incline-0.2.24 app/mailers/incline/user_mailer.rb
incline-0.2.23 app/mailers/incline/user_mailer.rb
incline-0.2.22 app/mailers/incline/user_mailer.rb
incline-0.2.21 app/mailers/incline/user_mailer.rb
incline-0.2.20 app/mailers/incline/user_mailer.rb
incline-0.2.19 app/mailers/incline/user_mailer.rb
incline-0.2.18 app/mailers/incline/user_mailer.rb
incline-0.2.17 app/mailers/incline/user_mailer.rb
incline-0.2.16 app/mailers/incline/user_mailer.rb
incline-0.2.15 app/mailers/incline/user_mailer.rb
incline-0.2.14 app/mailers/incline/user_mailer.rb
incline-0.2.13 app/mailers/incline/user_mailer.rb
incline-0.2.12 app/mailers/incline/user_mailer.rb
incline-0.2.11 app/mailers/incline/user_mailer.rb
incline-0.2.10 app/mailers/incline/user_mailer.rb
incline-0.2.9 app/mailers/incline/user_mailer.rb
incline-0.2.8 app/mailers/incline/user_mailer.rb
incline-0.2.7 app/mailers/incline/user_mailer.rb