function generateNotMail($sub, $address, $body)
{
    $message = parseNotHTML($body);
    $to = $address;
    $headers = "Content-type: text/html; charset=iso-8859-1" . "\n";
    error_log("Sending mail to {$to} about {$sub}");
    mailx($to, $sub, $message, $headers);
}
function generateNotMail($sub, $address, $body)
{
    $mail = new PHPMailer();
    $mail->IsSMTP();
    $mail->SMTPDebug = 0;
    $mail->SMTPAuth = true;
    // enable SMTP authentication
    $mail->SMTPSecure = "tls";
    $mail->Host = "smtp.purdue.edu";
    // sets the SMTP server
    $mail->Port = 587;
    // set the SMTP port for the GMAIL server
    $mail->Username = "******";
    // SMTP account username
    $mail->Password = "******";
    // SMTP account password
    $mail->SetFrom(WEB_SUPPORT_EMAIL, 'BreastfeedingMonitor - pCare');
    $mail->Subject = $sub;
    $mail->AddAddress($address, "pCare");
    $mail->IsHTML(true);
    $mail->Body = parseNotHTML($body);
    return $mail;
}