mentorenwahl/docker/backend/src/backend/mailers/teacher_registration_mailer.cr

33 lines
1.3 KiB
Crystal
Raw Normal View History

2022-02-10 07:43:47 +00:00
# Mentorenwahl: A fullstack application for assigning mentors to students based on their whishes.
# Copyright (C) 2022 Dominic Grimm
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
2022-01-28 17:30:20 +00:00
module Backend
module Mailers
2022-02-07 20:01:29 +00:00
# Sends teacher a polite registration mail to ask if they may input their data
2022-01-28 17:30:20 +00:00
class TeacherRegistrationMailer < Quartz::Composer
def sender : Quartz::Message::Address
2022-02-03 16:28:32 +00:00
address email: Backend.config.smtp.username, name: Backend.config.smtp.name
2022-01-28 17:30:20 +00:00
end
def initialize(user : Db::User)
to name: user.name, email: user.email
subject "Mentorenwahl Lehrer Registrierung"
text Kilt.render("#{__DIR__}/templates/teacher_registration_mailer.txt.ecr")
end
end
end
end