<?php

if (!empty($_POST["send"])) {

    $name = $_POST["userName"];
    $email = $_POST["userEmail"];
    $phone = $_POST["phone"];

    $subject = "Track Your Shipment";
    $body = "Hello \n Job $name \n Email: $email \n Zip Code: $phone \n ";
    
    $toEmail = "mina.adel@rewardlion.com";

    $mailHeaders = "From: " . $name . "<" . $email . ">\r\n";
    $mailHeaders = "Content-type: text/plain; charset=iso-8859-1\r\n";

    $retval = mail($toEmail, $subject, $body, $mailHeaders);


    if ($retval == true) {
        echo "Message sent successfully...";
    } else {
        echo "Message could not be sent...";
    }
}


header('location: index.php');
