Class: MaquinaNewsletters::NewsletterMailer

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

Instance Method Summary collapse

Instance Method Details

#issue(newsletter, recipient_email) ⇒ Object

issue: build a mail object for one recipient, ready to deliver. Used by:

- T22 (test_send action) → .deliver_now
- T29 (SendBatchJob)    → .deliver_later

The mailer does NOT walk the body to extract images (no cid: rewrite, per spec §7). The view handles cid: references via inline attachments or ActiveStorage URLs, depending on the rendering path.



12
13
14
15
# File 'app/mailers/maquina_newsletters/newsletter_mailer.rb', line 12

def issue(newsletter, recipient_email)
  @newsletter = newsletter
  mail(to: recipient_email, subject: newsletter.subject)
end