$newarray["comf_no"] = ""; } $newarray["firstname"] = ""; $newarray["lastname"] = ""; $newarray["loadamount"] = ""; $newarray["secret"] = ""; $newarray["cardnums"] = ""; $newarray["button1"] = ""; $newarray["button3"] = ""; $return_arr["aaData"] = $newarray; } echo json_encode($return_arr); break; case "remind": //list info from DB $list = $dbobj->updatereminder($action); if ($list['sendemail'] != 0) { //client email $email_body = file_get_contents('emails/reminder.html'); $full_name = $list['firstname'] . " " . $list['lastname']; $email_body = str_replace('[NAME]', $full_name, $email_body); //MailCode include 'lib/PHPMailer/PHPMailerAutoload.php'; $mail = new PHPMailer(); $mail->isSMTP(); // Set mailer to use SMTP $mail->Host = 'smtp.1and1.com'; // Specify main and backup SMTP servers $mail->SMTPAuth = true; // Enable SMTP authentication $mail->Username = '******';