title: Mysql Php Email Every Year
body: <p>I have been scratching my head on this one for awhile. I need to send out an email on certain days after someone registers with my site.</p>
  
  <p>Day of registration (Set up)
  1 month 
  3 months 
  6 months 
  1 year and every year after </p>
  
  <p>Right now an automatic email goes out the day of registration. That works fine but now I need one after 1 month and so on. The months I think I understand. It is just comparing the date to the registered on date, and then the yearly message I have no idea. I am still learning how to do this so any help would be great thanks!</p>
  
  <pre><code>//get status of email queue
  $q_lock = getLockStatus($conexao, 5);
  
  //if email queue is locked, exit the script
  if($q_lock)
  {
  exit();
  }
  //if email queue is not locked, lock it now and continue
  else
  {
  setLockStatus($conexao, 5, 1);
  }
  
  $aryQueue = getMemberemails($conexao);
  $date = date("Y-m-d");
  $current_year = date("Y");
  //echo '&lt;pre&gt;', print_r($aryQueue, true), '&lt;/pre&gt;';
  
  foreach($aryQueue as $e)
  {
  $email_id = $e["id"];
  $full_name = $e["full_name"];
  $to_name = $e["first_name"];
  $email= $e["email"];
  $member_id = $e["member_id"];
  $registered_on = $e["registered_on"];
  $yearly_message = date('Y-m-d', strtotime("$registered_on + 1 year"));
  $oneYearOn = date('Y-m-d',strtotime(date("Y-m-d", mktime()) . " + 365 
  day"));
  
  
  
  if( $date == $yearly_message){
  </code></pre>