title: How i send emails with localhost XAMPP using PHP
body: <pre><code>&lt;?php
        // display form if user has not clicked submit
        if (!isset($_POST["submit"])) {
        ?&gt;
  
        &lt;form action="&lt;?php echo $_SERVER["PHP_SELF"];?&gt;" method="post" style="width:100%; margin: 0 auto;"&gt;
          &lt;p&gt;
            &lt;label&gt;Nome:&lt;/label&gt;
            &lt;input name="textName" type="text" size="30" /&gt;
            &lt;label&gt;Email:&lt;/label&gt;
            &lt;input name="textEmail" type="text" size="30" /&gt;
            &lt;label&gt;Assunto:&lt;/label&gt;
            &lt;input name="textTitle" type="text" size="30" /&gt;
            &lt;label&gt;O seu comentário:&lt;/label&gt;
            &lt;textarea name="textarea" cols="5" rows="5"&gt;&lt;/textarea&gt;
            &lt;br /&gt;
            &lt;input class="button" type="submit" value="Enviar"/&gt;
          &lt;/p&gt;
        &lt;/form&gt;
  
        &lt;?php 
        } 
        else 
        {    // the user has submitted the form
        // Check if the "from" input field is filled out
          if (isset($_POST["textEmail"])) {
              $from = $_POST["textEmail"]; // sender
              $subject = $_POST["textTitle"];
              $message = $_POST["textarea"];
              // message lines should not exceed 70 characters (PHP rule), so wrap it
              $message = wordwrap($message, 70);
              // send mail
              mail("rubencpires@hotmail.com",$subject,$message,"From: $from\n");
              echo "Thank you for sending us feedback";
    }
  }
  ?&gt;
  </code></pre>
  
  <p>I think all the code for send an email is rigth but i think its necessary configuration to xammpp or something to send emails with Xammpp. Someone can help me?</p>