title: foreach isn't working correctly with simple xml
body: <p>Not sure why but the mailer keeps telling me I dont have an email in there, i know im just accessing it incorrectly</p>
  
  <p>XML file:
  `</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;schools&gt;
      &lt;schoolData&gt;
          &lt;name&gt;Dude&lt;/name&gt;
          &lt;schoolName&gt;NA&lt;/schoolName&gt;
          &lt;email&gt;sls@gmail.com&lt;/email&gt;
          &lt;mascot&gt;Da bears&lt;/mascot&gt;
      &lt;/schoolData&gt;
      &lt;schoolData&gt;
          &lt;name&gt;Dude2&lt;/name&gt;
          &lt;schoolName&gt;gg&lt;/schoolName&gt;
          &lt;email&gt;sl3@gmail.com&lt;/email&gt;
          &lt;mascot&gt;Muffin&lt;/mascot&gt;
      &lt;/schoolData&gt;
      &lt;schoolData&gt;
          &lt;name&gt;Dude3&lt;/name&gt;
          &lt;schoolName&gt;123&lt;/schoolName&gt;
          &lt;email&gt;s1@gmail.com&lt;/email&gt;
          &lt;mascot&gt;cheesecakeface&lt;/mascot&gt;
      &lt;/schoolData&gt;
      &lt;schoolData&gt;
          &lt;name&gt;Dude234&lt;/name&gt;
          &lt;schoolName&gt;456&lt;/schoolName&gt;
          &lt;email&gt;1@gmail.com&lt;/email&gt;
          &lt;mascot&gt;Bob&lt;/mascot&gt;
      &lt;/schoolData&gt;
  &lt;/schools&gt;
  </code></pre>
  
  <p>`</p>
  
  <pre><code>    &lt;?php
  $XML = simplexml_load_file('http://domain/hMail/data/list.xml');
  
  foreach ($XML as $school) {
      $mail-&gt;AltBody = 'Come see me play Tonight!';
      $mail-&gt;msgHTML(file_get_contents('contents.html'), dirname(__FILE__));
      $mail-&gt;addAddress($school-&gt;schoolData-&gt;email);
  }
  </code></pre>
  
  <p>`</p>
  
  <p>`
  I've also tried $XML->schoolData / $school->email</p>