send simple email using codeigniter
<p>I am trying to send simple email using codeigniter as explain this link <a href="https://www.codeigniter.com/user_guide/libraries/email.html" rel="nofollow">codeigniter email class</a> ,but it doesn't work.
This is my form :</p>

<pre><code>&lt;form method="post" action="&lt;?php base_url()?&gt;main/send_email"&gt;
               &lt;input type="text" placeholder="Name" name="name" class="name"&gt;
               &lt;input type="text" placeholder="Surname" name="surname" class="surname"&gt;
               &lt;input type="email" placeholder="email" name="email" class="email"&gt;
               &lt;textarea placeholder="What's on your mind" name="text" class="text"&gt;&lt;/textarea&gt;
               &lt;input type="submit" value="SEND" class="send_mail" name="send_mail"&gt;
&lt;/form&gt;
</code></pre>

<p>And this is my controller</p>

<pre><code>  &lt;?php
    defined('BASEPATH') OR exit('No direct script access allowed');

   class Main extends CI_Controller {
     public function __construct(){
     parent::__construct();
     $this-&gt;load-&gt;helper("common_helper");

    date_default_timezone_set('Asia/Tbilisi');
 }

public function index()
{

    $this-&gt;load-&gt;view('pages/main');
}

public function send_email()
{
    $this-&gt;load-&gt;library("email");
    if($this-&gt;input-&gt;post("send_mail"))
    {
        $name = $this-&gt;input-&gt;post("name");
        $surname = $this-&gt;input-&gt;post("surname");
        $email = $this-&gt;input-&gt;post("email");
        $text = $this-&gt;input-&gt;post("text");
         $this-&gt;email-&gt;from($email, $name);
         $this-&gt;email-&gt;to('77vanich77@gmail.com');
         $this-&gt;email-&gt;subject('Email Test');
         $this-&gt;email-&gt;message('testing email message');

         $this-&gt;email-&gt;send();
    }


 }
}
</code></pre>

<p>I don't have any error.</p>