title: How to send email on a specific date?
body: <p><strong>I have a php form that sends emails</strong>
  <em>however I would like to use specified dates as a parameter to send the email for example</em></p>
  <pre><code>?php
  $Cristimas = '2021-12-25'; 
  $time = strtotime($Cristimas);
  while(date('m-d') == date('m-d', $time)) {
      
  
  
  
  if(isset($_POST['submit'])){
      $to =  $_POST['email']; // this is your Email address
      $from = &quot;youremail@gmail.com&quot;; // this is the sender's Email address
      $first_name = $_POST['first_name'];
      $last_name = $_POST['last_name'];
   
      $subject = &quot;Form submission&quot;;
      $subject2 = &quot;Copy of your form submission&quot;;
      $message = $first_name . &quot; &quot; . $last_name . &quot; wrote the following:&quot; . &quot;\n\n&quot; . $_POST['message'];
      $message2 = &quot;Here is a copy of your message &quot; . $first_name . &quot;\n\n&quot; . $_POST['message'];
  
      $headers = &quot;From:&quot; . $from;
      $headers2 = &quot;From:&quot; . $to;
      mail($to,$subject,$message,$headers);
      mail($from,$subject2,$message2,$headers2); // sends a copy of the message to the sender
      echo &quot;Mail Sent. Thank you &quot; . $first_name . &quot;, we will contact you shortly.&quot;;
      // You can also use header('Location: thank_you.php'); to redirect to another page.
      }
  }
  
  ?&gt;
  
  </code></pre>