kodgemisi/confdeck

View on GitHub
app/mailers/invitation_mailer.rb

Summary

Maintainability
A
0 mins
Test Coverage
# 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 <http://www.gnu.org/licenses/>.

class InvitationMailer < ActionMailer::Base
  default from: "confmanrumble@gmail.com"

  # Subject can be set in your I18n file at config/locales/en.yml
  # with the following lookup:
  #
  #   en.invitation_mailer.invite.subject
  #
  def invite_email(invitation)
    @organization = Organization.find(invitation.organization_id)
    @token = invitation.token

    mail to: invitation.email, subject: "New invitation for ConfMan organization"
  end
end