title: Send to multiple recipients in Rails with ActionMailer
body: <p>I'm trying to send multiple emails based on a boolean value in my database. The app is a simple scheduling app and user can mark their shift as "replacement_needed" and this should send out emails to all the users who've requested to receive these emails. Trouble is, it only every seems to send to one email. Here's my current code:</p>
  
  <pre><code> def request_replacement(shift)
        @shift = shift
        @user = shift.user
        @recipients = User.where(:replacement_emails =&gt; true).all
        @url  = root_url
        @recipients.each do |r|
          @name = r.fname
          mail(:to =&gt; r.email,
             :subject =&gt; "A replacement clerk has been requested")
        end
    end
  </code></pre>