Sha256: 40c0f34e22adb4dd36b72f18ab4ca1c84d6ebb4bf2a2d7b394a4e406c0200559

Contents?: true

Size: 1.12 KB

Versions: 24

Compression:

Stored size: 1.12 KB

Contents

module EgovUtils
  class RegistrationRequestMailer < ApplicationMailer
    before_action { @host = params && params[:host] || Rails.application.config.action_mailer.default_url_options[:host] }
    DEFAULT_MAIL = 'vts@msp.justice.cz'

    def created(request_id)
      @request = EgovUtils::RegistrationRequest.find(request_id)

      mail(to: @request.mail, cc: DEFAULT_MAIL, subject: I18n.t('mailers.registration_requests.created.subject'))
    end

    def accepted(request_id, user_id, password)
      @request = EgovUtils::RegistrationRequest.find(request_id)
      @user = User.find(user_id)
      @password = password

      mail(to: @user.mail, subject: I18n.t('mailers.registration_requests.accepted.subject'))
    end

    def auto_accepted(request_id)
      @request = EgovUtils::RegistrationRequest.find(request_id)

      mail(to: @request.mail, subject: I18n.t('mailers.registration_requests.auto_accepted.subject'))
    end

    def rejected(request_id)
      @request = EgovUtils::RegistrationRequest.find(request_id)

      mail(to: @request.mail, subject: I18n.t('mailers.registration_requests.rejected.subject'))
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
egov_utils-1.5.0.alpha16 app/mailers/egov_utils/registration_request_mailer.rb
egov_utils-1.5.0.alpha15 app/mailers/egov_utils/registration_request_mailer.rb
egov_utils-1.5.0.alpha14 app/mailers/egov_utils/registration_request_mailer.rb
egov_utils-1.5.0.alpha13 app/mailers/egov_utils/registration_request_mailer.rb
egov_utils-1.5.0.alpha12 app/mailers/egov_utils/registration_request_mailer.rb
egov_utils-1.5.0.alpha11 app/mailers/egov_utils/registration_request_mailer.rb
egov_utils-1.5.0.alpha10 app/mailers/egov_utils/registration_request_mailer.rb
egov_utils-1.5.0.alpha9 app/mailers/egov_utils/registration_request_mailer.rb
egov_utils-1.5.0.alpha8 app/mailers/egov_utils/registration_request_mailer.rb
egov_utils-1.5.0.alpha7 app/mailers/egov_utils/registration_request_mailer.rb
egov_utils-1.5.0.alpha6 app/mailers/egov_utils/registration_request_mailer.rb
egov_utils-1.5.0.alpha5 app/mailers/egov_utils/registration_request_mailer.rb
egov_utils-1.5.0.alpha4 app/mailers/egov_utils/registration_request_mailer.rb
egov_utils-1.4.5 app/mailers/egov_utils/registration_request_mailer.rb
egov_utils-1.4.4 app/mailers/egov_utils/registration_request_mailer.rb
egov_utils-1.5.0.alpha3 app/mailers/egov_utils/registration_request_mailer.rb
egov_utils-1.5.0.alpha2 app/mailers/egov_utils/registration_request_mailer.rb
egov_utils-1.5.0.alpha1 app/mailers/egov_utils/registration_request_mailer.rb
egov_utils-1.4.3 app/mailers/egov_utils/registration_request_mailer.rb
egov_utils-1.4.2 app/mailers/egov_utils/registration_request_mailer.rb