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