title: CodeIgniter send multiple email
body: <p>I am using CodeIgniter with its default library. And whenever I send an email, it's sending it twice. Does anyone have some debugging pointers or hints to resolve this issue?</p>
  
  <pre><code>$this-&gt;CI-&gt;email-&gt;from($this-&gt;from, $this-&gt;company_name);
  $this-&gt;CI-&gt;email-&gt;to($this-&gt;to);
  $this-&gt;CI-&gt;email-&gt;subject($this-&gt;subject);
  
  eval("\$message = \"".$this-&gt;message."\";");
  
  $this-&gt;CI-&gt;email-&gt;message($this-&gt;message);
  
  if($attachment != "")
  {
      $attac_exp=explode(",",$attachment);
  
      foreach($attac_exp as $key=&gt;$value) 
      {
          if($value != '')
          {
              $this-&gt;CI-&gt;email-&gt;attach(getcwd()."/attachments/".$value);                 
          }
      }
  }
  
  $this-&gt;CI-&gt;email-&gt;send();
  $this-&gt;CI-&gt;email-&gt;clear(true);
  </code></pre>
  
  <p>I have configured sendmail with SMTP for now.</p>
  
  <p>If I try to send an email via the command line I am getting only one email. As far as I know, the issue must be with CodeIgniter. I have already done my research on this.</p>