Sha256: e21828ecd4f03a7186fe6bbb371293c3709177c85653dd8109b07690e2196d83

Contents?: true

Size: 383 Bytes

Versions: 3

Compression:

Stored size: 383 Bytes

Contents

class PostMailer < ActionMailer::Base
  helper MailerHelper
  default from: 'wingolfsplattform@wingolf.org'
  
  def post_email(text, recipients, subject, current_user)
    to_emails = recipients.collect { |user| "#{user.title} <#{user.email}>" }
    @text = text
    @subject = subject.gsub(/\[.*\]/, '')
    mail to: to_emails, from: current_user.email, subject: subject
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
your_platform-1.0.1 app/mailers/post_mailer.rb
your_platform-1.0.0 app/mailers/post_mailer.rb
your_platform-0.0.2 app/mailers/post_mailer.rb