title: unsubscribe to a newsletter
body: <p>I want to add a linf to unsign to my newsletter. I can't succeed to give my variable  "email" in the newsletter.
  I send the newsletter to some email in the same time
  $template allow to the newsletter to get data from database,and my newsletter in in html with variables like this: {{variable}}
  I tried to put my code template in my while, but the email is still the first emai.
  Do you have an idea?</p>
  
  <p>here's the code:</p>
  
  <pre><code>if($_POST['recipients']) {
  
      $template = file_get_contents('template/emails/newsletter.html');
  
      $addresses = explode(';', $_POST['recipients']);
      $subject = stripslashes($_POST['subject']);
      foreach($addresses as $address) {
  
      $newsletter_unsign =  ' &lt;a href="http://dev.cater2.me/unsign-newsletter.php?id='.$address.'"&gt;Unsubscribe from the newsletter&lt;/a&gt;.';
  
      $template = str_replace(array('{{newsletter_top_bar}}','{{newsletter_top}}','{{newsletter_title1}}','{{newsletter_body1}}','{{newsletter_title2}}','{{newsletter_body2}}','{{newsletter_title3}}','{{newsletter_body3}}','{{newsletter_side_title}}','{{newsletter_side}}','{{newsletter_bottom}}','{{newsletter_footer}}','{{newsletter_unsign}}'),
                    array($_POST['newsletter_top_bar'],$_POST['newsletter_top'],$_POST['newsletter_title1'],$_POST['newsletter_body1'],$_POST['newsletter_title2'],$_POST['newsletter_body2'],$_POST['newsletter_title3'],$_POST['newsletter_body3'],$_POST['newsletter_side_title'],$_POST['newsletter_side'],$_POST['newsletter_bottom'],$_POST['newsletter_footer'], $newsletter_unsign),
                    $template);
  
  
          $address = trim($address);
  
          sendMail($address, $subject, str_replace('{{c2me_tracking_link}}', 'http://cater2.me/?ref='.urlencode(c2me_encrypt($address)), $template), true);
      }
  
      notif('E-mail(s) sent');
  }
  </code></pre>
  
  <p>}</p>