include_once'emailModel.php'; include_once'emailView.php'; $author = $_POST['author']; $agency = $_POST['agency']; $email = new emailModel(); $resultIds = $email->loadIds(); $resultEmails = $email->loadEmail($agency); $receiverEmails = ""; $subject = "BOLO Alert"; $view = new Email_View(); $model = new EmailModel(); $data = $model->getlast(); $result = $data->fetch_assoc(); $id = $result['bolo_id']; $path= ' <a href="http://bolo.cs.fiu.edu/bolofliercreator/?page_id=1488&idBolo=' . "$id" . '">here</a>'; $file = 'uploads/preview' . $author . '.pdf'; $file_size = filesize($file); $mail = new PHPMailer(); // defaults to using php "mail()" //add all email addresses to send to while ($row= mysqli_fetch_array($resultEmails)) {