Clove's PHP Mail Code

last edited 9:30 11/8/2003

What is this? This is a script that can allow you to send info through a web page to an email address

To Make this work, all you need to do is Edit FORM1-THANKS.PHP with your TO: and FROM: email addresses

Then it should work :) Below I tried to tell you as best as I could how to edit it.

I have been using this exact code for a while now, Perhaps the code could be cleaned up a bit but it works with out any hitches for what I need it to.


FORM1-THANKS.PHP

To Customise the TO: and FROM: edit form1-thanks.php with the following

$to = "YOUR NAME <YOU@YourDOMAIN.COM>

And Replace With your email: (where you want it TO:)

$to = "Charles <Charles@My-Domainxyz123.Com>

AND...

$headers .= "From: SYSTEM ADMIN <SYSADMIN@YourDOMAIN.COM>\r\n";

And Replace With another email: (where you want it From:)

$headers .= "From: Charles@My-Domainxyz123.Com>\r\n";


FORM1.PHP

Change this file as you wish, if you add or remove fields here you will need to tweak the form1-thanks.php file with the new names.

Also Note: if you rename form1-thanks be sure to edit form1.php line (seen below)

<form method="POST" action="form1-thanks.php" onsubmit="return FrontPage_Form1_Validator(this)" language="JavaScript" name="FrontPage_Form1">

Change form1-thanks.php to what ever you renamed the file to, if you did at all


Try it.. :) Enjoy It!