Class: PeerReviewMailer

Inherits:
ApplicationMailer show all
Defined in:
app/mailers/peer_review_mailer.rb

Instance Method Summary collapse

Instance Method Details

#send_private_email(from, to, peer_review, content, subject) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'app/mailers/peer_review_mailer.rb', line 4

def send_private_email(from, to, peer_review, content, subject)
  @content = content
  @from = from
  @peer_review = peer_review
  @to = to

  subject ||= "New message from peer review #{@peer_review.title}"

  # Postmark metadatas
  ['user-id-from'] = @from.id
  ['user-id-to'] = @to.id

  mail(
    to: "#{@to.full_name} <#{@to.email}>",
    from: "JOGL - Just One Giant Lab <notifications@#{Rails.configuration.email}>",
    subject: subject,
    tag: 'peer-review-mass-email'
  )
end