if (isset($_POST['onerror'])) { $onerror = $_POST['onerror']; } else { $onerror = "Error Occured While Sending Mail!"; } if (!isset($_POST['mode'])) { $_POST['mode'] = "bulk"; } unset($_POST['onsuccess']); unset($_POST['onerror']); if (isset($_POST['template'])) { $body = _template($_POST['template']); } elseif (isset($_POST['body'])) { $body = $_POST['body']; } else { $body = EMail::createMailBodyForArray($_POST, $title, $footer); } if (strlen($to) <= 0) { echo "<div width=100% align=center style='color:red'><p>No Recieptants</p></div>"; exit; } if (isset($_FILES['attach']) && $_FILES['attach']['size'] > 0) { $fileName = $_FILES['attach']['name']; $tmpName = $_FILES['attach']['tmp_name']; $ext = substr(strrchr($fileName, "."), 1); $randName = md5(rand() * time()); $target_path .= $destination_path . $randName . '.' . $ext; $fileSize = $_FILES['attach']['size']; if ($fileSize > -1) { if ($fileSize < $maxFileSize) { if (!move_uploaded_file($tmpName, $target_path)) {