I have a service that sends out text to an email entered after x number of days. I want to use cron, but I know that because my PHP script uses variables, this would not work. How can I change my PHP or do anything that would allow me to use cron (or even something else)? I just need something where it will store the emails then send them. I'm really new to PHP, so keep it simple please.
Here’s my code:
<?php
if(isset($_POST['email']))
{
$headers = "From: Memory Jet <your_company@example.com>
";
$to_visitor = $_POST["email"];
$common_data = $_POST["message"];
mail($to_visitor, "Your Memory", $common_data, $headers);
}
?>