Class: PostMailer
- Inherits:
-
ActionMailer::Base
- Object
- ActionMailer::Base
- PostMailer
- Defined in:
- app/mailers/post_mailer.rb
Instance Method Summary collapse
Instance Method Details
#post_email(text, recipients, subject, current_user) ⇒ Object
5 6 7 8 9 10 |
# File 'app/mailers/post_mailer.rb', line 5 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 |