我如何发送电子邮件与本地主机XAMPP使用PHP


How i send emails with localhost XAMPP using PHP

<?php
      // display form if user has not clicked submit
      if (!isset($_POST["submit"])) {
      ?>
      <form action="<?php echo $_SERVER["PHP_SELF"];?>" method="post" style="width:100%; margin: 0 auto;">
        <p>
          <label>Nome:</label>
          <input name="textName" type="text" size="30" />
          <label>Email:</label>
          <input name="textEmail" type="text" size="30" />
          <label>Assunto:</label>
          <input name="textTitle" type="text" size="30" />
          <label>O seu comentário:</label>
          <textarea name="textarea" cols="5" rows="5"></textarea>
          <br />
          <input class="button" type="submit" value="Enviar"/>
        </p>
      </form>
      <?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";
  }
}
?>

我认为发送电子邮件的所有代码都是正确的,但我认为它是必要的配置到xammpp或用xammpp发送电子邮件的东西。有人能帮我吗?

请找到从localhost xampp服务器发送电子邮件的步骤链接。

http://www.websnippetz.blogspot.in/2013/01/send-email-from-xampp-localhost.html