title: For loop through string array with array.each do not working?
body: <p>I'm working on a basic contact form as part of learning Ruby where there are a string of email addresses in an array and the message in a contact form is sent to each one through Rails Pony.</p>
  
  <pre><code>ADDRESSES_BOOK = ['example1@example.com', 'example2@example.com']
  def deliver
  return false unless valid?
  ADDRESSES_BOOK.each do |address|
    Pony.mail({
      :to =&gt; ADDRESSES_BOOK[address],
      :from =&gt; %("#{name}" &lt;#{email}&gt;),
      :reply_to =&gt; email,
      :subject =&gt; subject,
      :body =&gt; contactFormMessage,
    })
  end
  end
  </code></pre>
  
  <p>I'm doing something wrong with the loop, as it throws the error "no implicit conversion of String into Integer."</p>
  
  <p>What am I doing wrong here?</p>
  
  <p>Thanks!</p>