honeybadger-io / heya

Heya 👋 is a campaign mailer for Rails. Think of it like ActionMailer, but for timed email sequences. It can also perform other actions like sending a text message.
https://www.heya.email
Other
736 stars 33 forks source link

Add lambda support for from, bcc, and reply_to campaign options #233

Closed armiiller closed 7 months ago

armiiller commented 8 months ago

Adds support for lambdas in the from, bcc, and reply_to email options. Currently only the to field support dynamic addressing.

Use case: I needed to support sending from dynamic email addresses for whitelabeling.

step :support,
  from: ->(user){user.account.brand_support_email.presence || "noreply@example.com"}
rodloboz commented 8 months ago

We need this exact feature to dynamically set the from email address