title: Adding unsubscribe link in custom email magento
body: <p>How to add unsubscribe link in custom email notification i am sending an email through zend mail function i follow this function <a href="https://stackoverflow.com/questions/5663088/sending-mail-in-magento">sending mail in magento</a>  in body part i want to add unsubscribe link how can we implement that?
  In my e mail notification i am using this function.</p>
  
  <pre>
  <code>
  public function sendMail()
      {           
          $post = $this->getRequest()->getPost();     
          if ($post){
                  $random=rand(1234,2343);
  
                  $to_email = $this->getRequest()->getParam("email");
                  $to_name = 'Hello User';
                  $subject = ' Test Mail- CS';
                  $Body="Test Mail Code : "; 
  
                  $sender_email = "sender@sender.com";
                  $sender_name = "sender name";
  
                  $mail = new Zend_Mail(); //class for mail
                  $mail->setBodyHtml($Body); //for sending message containing html code
                  $mail->setFrom($sender_email, $sender_name);
                  $mail->addTo($to_email, $to_name);
                  //$mail->addCc($cc, $ccname);    //can set cc
                  //$mail->addBCc($bcc, $bccname);    //can set bcc
                  $mail->setSubject($subject);
                  $msg  ='';
                  try {
                        if($mail->send())
                        {
                           $msg = true;
                        }
                      }
                  catch(Exception $ex) {
                          $msg = false;
                          //die("Error sending mail to $to,$error_msg");
                  }
                  $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($msg));
              }
      }
  </code>
  </pre>