title: how i send form value to mail in php
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/634029/how-to-send-mail-using-php">How to send mail using PHP?</a><br>
    <a href="https://stackoverflow.com/questions/7331006/php-mail-cannot-be-sent-with-smtp-gmail-com">php mail cannot be sent with smtp.gmail.com</a>  </p>
  </blockquote>
  
  
  
  <p>I'm having some problems sending mail in PHP using the <code>mail()</code> function.
  here is my php code</p>
  
  <pre><code>&lt;html&gt;
  &lt;body&gt;
  
  &lt;?php
  if (isset($_REQUEST['email']))
  //if "email" is filled out, send email
    {
    //send email
    ini_set("SMTP", "ssl://smtp.gmail.com");
    $email = $_REQUEST['email'] ;
    $subject = $_REQUEST['subject'] ;
    $message = $_REQUEST['message'] ;
    mail("mr.choudhary_2008@rediff.com",$subject,$message,"From:" .$email);
    echo "Thank you for using our mail form";
    }
  else
  //if "email" is not filled out, display the form
    {
    echo "&lt;form method='post' action='email.php'&gt;
    Email: &lt;input name='email' type='text' /&gt;&lt;br /&gt;
    Subject: &lt;input name='subject' type='text' /&gt;&lt;br /&gt;
    Message:&lt;br /&gt;
    &lt;textarea name='message' rows='15' cols='40'&gt;
    &lt;/textarea&gt;&lt;br /&gt;
    &lt;input type='submit' /&gt;
    &lt;/form&gt;";
    }
  ?&gt;
  
  &lt;/body&gt;
  &lt;/html&gt; 
  </code></pre>
  
  <p>The error I'm getting is:</p>
  
  <pre><code>Warning: mail() [function.mail]: Failed to connect to mailserver at "ssl://smtp.gmail.com" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in D:\xampp\htdocs\email.php on line 14
  
  Thank you for using our mail form
  </code></pre>