Wrox Programmer Forums
|
BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0
This is the forum to discuss the Wrox book Beginning PHP5, Apache, and MySQL Web Development by Elizabeth Naramore, Jason Gerner, Yann Le Scouarnec, Jeremy Stolz, Michael K. Glass; ISBN: 9780764579660
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 3rd, 2007, 03:03 AM
Authorized User
 
Join Date: Nov 2006
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to vinu123 Send a message via Yahoo to vinu123
Default Using Sendmail.php How shall i?

I a using Sendmail.php with this code

<html>
<head>
<title>Mail Sent!</title>
</head>
<body>
<?php
$to = $_POST["to"];
$from = $_POST["from"];
$subject = $_POST["subject"];
$message = $_POST["message"];
$headers = "From: " . $from . "\r\n";
$mailsent = mail($to, $subject, $message, $headers);
if ($mailsent) {
  echo "Congrats! The following message has been sent: <br><br>";
  echo "<b>To:</b> $to<br>";
  echo "<b>From:</b> $from<br>";
  echo "<b>Subject:</b> $subject<br>";
  echo "<b>Message:</b><br>";
  echo $message;
} else {
  echo "There was an error...";
}
?>
</body>
</html>



& my Form.php is following:


<html>
<head>
<title>Enter E-mail Data</title>
</head>
<body>
<form name="theform" method="post" action="sendmail.php">
<table>
  <tr>
    <td>To:</td>
    <td><input type="text" name="to" size="50"></td>
  </tr>
  <tr>
    <td>From:</td>
    <td><input type="text" name="from" size="50"></td>
  </tr>
  <tr>
    <td>Subject:</td>
    <td><input type="text" name="subject" size="50"></td>
  </tr>
  <tr>
    <td valign="top">Message:</td>
    <td>
      <textarea cols="60" rows="10" name="message"
      >Enter your message here</textarea>
    </td>
  </tr>
  <tr>
    <td></td>
    <td>
      <input type="submit" value="Send">
      <input type="reset" value="Reset the form">
    </td>
  </tr>
</table>
</form>
</body>
</html>

How shall i configure my PHP.ini in order to send the mails from this form.

Regards,
Vinod soable;
Email : vinodsobale@gmail.com
http://top10web.co.nr
__________________
Regards,
Vinod soable;
Email : vinodsobale@gmail.com
http://top10web.co.nr
 
Old January 5th, 2007, 03:22 AM
Registered User
 
Join Date: Jan 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Have a look at the PHP 5 Manual under "Mail Functions". It gives you all the information there.





Similar Threads
Thread Thread Starter Forum Replies Last Post
sendmail binary needed for sending email in PHP crmpicco Beginning PHP 2 October 6th, 2007 02:30 PM
SendMail Problem bahachin Excel VBA 0 November 22nd, 2006 09:45 AM
Sendmail datagram Classic ASP Components 5 April 10th, 2005 06:26 PM
Sendmail datagram Classic ASP Components 4 March 8th, 2005 08:21 AM
Using SendMail over ASP Paleo Classic ASP Components 1 July 29th, 2003 01:45 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.