public function sendMail($subject = null, $mailto = null, $mailtoName = null)
   {
      # mailer send FROM
      $this->setFrom($this->from_mail, $this->from_name);

      # mailer Reply TO
      $this->addReplyTo($this->replyto_mail, $this->replyto_name);

      # mailer set BCC
      ( $this->setBcc ) ? $this->addBcc($this->mail_bcc) : false;

      # mailer set CC
      ( $this->setCc ) ? $this->addCc($this->mail_cc) : false;

      # mailer send TO --> If $mailto is null by default the replyTo config mail value will be used instead
      if ( is_null($mailto) ) {

         $this->addAddress($this->replyto_mail, $this->replyto_name);

      } else {
         ( is_array($mailto) ) ? $this->addAddress($mailto[0], $mailto[1]) : $this->addAddress($mailto, $mailtoName);
      }

      # mailer message subject
      $this->Subject = $subject;
      # mailer line wrap for text/plain format: see RFC 2646;
      $this->WordWrap = 72;

      if ( !$this->isHTML ) {
         # format only plain/text format
         $this->isHTML(false);
         $this->Body = $this->textBody;

      } else {
         # format message as HTML and alternatively text/plain for
         # those Email Client that do not support HTML format such as Eudora
         $this->msgHTML($this->htmlBody);
         # If it is set a template.txt file, its contents will be parsed instead
         # of strip html tags form the content HTML body
         # the use of plain-text as template might be better than just let the html be stripped to
         # a text format wich can get some break lines and undesirable message body
         if ( $this->textBody ) {

            $this->AltBody = $this->formatHtml2Text($this->textBody);

         } else {

            $this->AltBody = $this->formatHtml2Text($this->AltBody);

         }
      }

      # to debug the message body in browser set
      # config mail_debug to 'local' in mail_config file
      $this->local_debug();

      if (!$this->send()) {
          log_message('error','PHPMailer Error : mail address --> ' . $mailto);
         return false;
      } else {
         return true;
      }
   }