<?php 
if (isset($_POST['submit'])) {
    // Setup the headers
    $headers = "From: EES Mail Admin <admin@eestms.com>\n"; 
    $headers .= "MIME-Version: 1.0\n";
    $headers .= "Content-type: text/html; charset=iso-8859-1\n";
    $headers .= "List-Unsubscribe: <https://www.eestms.com/tms/updateUser.php?updateUserID=18746>\n";

//    $headers = "From: admin@eestms.com\r\n"; 
//    $headers .= "Reply-To: admin@eestms.com\r\n"; 
//    $headers .= "From: admin@eestms.com\r\n"; 
//    $headers .= "X-Mailer: PHP/" . phpversion() . "\r\n"; 
//    $headers .= "MIME-Version: 1.0\r\n";
//    $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
    
//    $headers .= "Reply-To: EES Mail Admin <admin@eestms.com>\r\n";
//    $headers .= "Return-Path: EES Mail Admin <admin@eestms.com>\r\n";
//    $headers .= "From: EES Mail Admin <admin@eestms.com>\r\n";
//    $headers .= "Organization: Evolve Engineering & Software\r\n";
//    $headers .= "MIME-Version: 1.0\r\n";
//    $headers .= "Content-type: text/plain; charset=iso-8859-1\r\n";
//    $headers .= "X-Priority: 3\r\n";
//    $headers .= "X-Mailer: PHP". phpversion() ."\r\n";
//    $headers .= "X-MSMail-Priority: High\r\n";

    // Send email 
//    $mail = mail("sdunn@evolveeng.com", "subject1", "message1" . time(), $headers, "-f admin@eestms.com");  
    $mail = mail("sdunn@evolveeng.com", "Working Hard?", "<html>Hello, We are looking at working hard this weekend.  Please contact s when you have the opportunity.  Thanks, Steven</html>", $headers);  
echo '<script>alert("sdunn@evolveeng.com-' . $mail . '");</script>';
    $mail = mail("test-9ugoy84jf@srv1.mail-tester.com", "Working Hard?", "<html>Hello, We are looking at working hard this weekend.  Please contact us when you have the opportunity.  Thanks, Steven</html>", $headers);  
echo '<script>alert("test-9ugoy84jf@srv1.mail-tester.com-' . $mail . '");</script>';
////    $mail = mail("siradair@yahoo.com", "Working Hard?", "message2". time(), $headers, "-f admin@eestms.com");  
    $mail = mail("siradair@yahoo.com", "Working Hard?", "<html>Hello, We are looking at working hard this weekend.  Please contact us when you have the opportunity.  Thanks, Steven</html>", $headers);  
echo '<script>alert("siradair@yahoo.com-' . $mail . '");</script>';
    $mail = mail("siradair@hotmail.com", "Working Hard?", "<html>Hello, We are looking at working hard this weekend.  Please contact us when you have the opportunity.  Thanks, Steven</html>", $headers);  
echo '<script>alert("siradair@hotmail.com-' . $mail . '");</script>';
//    $mail = mail("info@evolveeng.com", "Good Morning", "Good Morning my love.  How was your day?  I hope that you have a good day!", $headers);  
//echo '<script>alert("siradair@yahoo.com-' . $mail . '");</script>';

    // redirect to the test page
    echo ('<script>window.location = "testMail.php";</script>');
}   
?>
<head>
</head>

<body class="thrColElsHdr">
</<body>
<!--    <form action="testMailBackend.php">
        <input type=Submit value="Test">
    </form>-->
    <form action="testMail.php" method = "post">
        <input type = "submit" name = "submit" value = "Submit">
<!--        <input type=Submit value="Test">-->
    </form>
</body>
