`NonprofitMailer.refund` incorrectly tries to send even if nothing in `to:`
wwahammy opened this issue · 2 comments
wwahammy commented
It's possible for the nonprofit to have no users set to receive notifications of payments, i.e. the call on line 23
houdini/app/mailers/nonprofit_mailer.rb
Lines 23 to 24 in 095d28b
mail
on line 24 error out (at least if you're using AWS SES) as it's incorrect to send an email with nothing in the "to:" header.
The fix would be to add a guard on line 24 against @emails
being an empty array.
victordscabral commented
Me (@victordscabral), @kayrocesar and @joaobisi will work on it.
victordscabral commented
Link to the PR: #1460