Class: Securial::SecurialMailer

Inherits:
ApplicationMailer show all
Defined in:
app/mailers/securial/securial_mailer.rb

Overview

SecurialMailer

# This class serves as the mailer for Securial, handling email notifications related to user account management, such as welcome emails, sign-in notifications, account updates, and password recovery.

It inherits from ApplicationMailer, allowing it to utilize the base mailer functionality provided by Securial::ApplicationMailer.

This class can be extended to add more email functionalities as needed.

Instance Method Summary collapse

Instance Method Details

#forgot_password(securial_user) ⇒ void

This method returns an undefined value.

Sends a password recovery email.

containing instructions for resetting the password.



52
53
54
55
56
# File 'app/mailers/securial/securial_mailer.rb', line 52

def forgot_password(securial_user)
  @user = securial_user
  subject = Securial.configuration.mailer_forgot_password_subject
  mail subject: subject, to: securial_user.email_address
end

#sign_in(securial_user, securial_session) ⇒ void

This method returns an undefined value.

Sends a sign-in notification email.



30
31
32
33
34
35
# File 'app/mailers/securial/securial_mailer.rb', line 30

def (securial_user, securial_session)
  @user = securial_user
  @session = securial_session
  subject = Securial.configuration.
  mail subject: subject, to: securial_user.email_address
end

#update_account(securial_user) ⇒ void

This method returns an undefined value.

Sends an account update notification email.



41
42
43
44
45
# File 'app/mailers/securial/securial_mailer.rb', line 41

def (securial_user)
  @user = securial_user
  subject = Securial.configuration.
  mail subject: subject, to: securial_user.email_address
end

#welcome(securial_user) ⇒ void

This method returns an undefined value.

Sends a welcome email to a new user.



19
20
21
22
23
# File 'app/mailers/securial/securial_mailer.rb', line 19

def welcome(securial_user)
  @user = securial_user
  subject = Securial.configuration.
  mail subject: subject, to: securial_user.email_address
end