|
|
|
|
![]() ![]() |
Mar 11 2005, 01:02 PM
Post
#11
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 310 Joined: 9-February 05 From: Italian Member No.: 3,677 |
at first you must html for and post it to php.php file
then copy paste this code to notepad and save php.php CODE <?php
$MailToAddress = "Here"; // your email address $redirectURL = "ADD of your page next this page "; // the URL of the thank you page. # optional settings $MailSubject = "[mail subject for u]"; // the subject of the email $MailToCC = "here"; // CC (carbon copy) also send the email to this address (leave empty if you don't use it) # in the $MailToCC field you can have more then one e-mail address like "a@yoursite.com, b@yoursite.com, c@yoursite.com" # If you are asking for a name and an email address in your form, you can name the input fields "name" and "email". # If you do this, the message will apear to come from that email address and you can simply click the reply button to answer it. # You can use this scirpt to submit your forms or to receive orders by email. # If you have a multiple selection box or multiple checkboxes, you MUST name the multiple list box or checkbox as "name[]" instead of just "name" # you must also add "multiple" at the end of the tag like this: <select name="myselectname[]" multiple> # you have to do the same with checkboxes # This script was written by George A. & Calin S. from Web4Future.com # There are no copyrights in the sent emails. # SPAMASSASSIN RATING: 0.4 # DO NOT EDIT BELOW THIS LINE ================================================================== # ver. 1.5 $w4fMessage = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\"><html><head><title>$MailSubject</title><meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\"></head><body>"; if (count($_GET) >0) { reset($_GET); while(list($key, $val) = each($_GET)) { $GLOBALS[$key] = $val; if (is_array($val)) { $w4fMessage .= "<b>$key:</b> "; foreach ($val as $vala) { $vala =stripslashes($vala); $w4fMessage .= "$vala, "; } $w4fMessage .= "<br>"; } else { $val = stripslashes($val); if (($key == "Submit") || ($key == "submit")) { } else { if ($val == "") { $w4fMessage .= "$key: - <br>"; } else { $w4fMessage .= "<b>$key:</b> $val<br>"; } } } } // end while }//end if else { reset($_POST); while(list($key, $val) = each($_POST)) { $GLOBALS[$key] = $val; if (is_array($val)) { $w4fMessage .= "<b>$key:</b> "; foreach ($val as $vala) { $vala =stripslashes($vala); $w4fMessage .= "$vala, "; } $w4fMessage .= "<br>"; } else { $val = stripslashes($val); if (($key == "Submit") || ($key == "submit")) { } else { if ($val == "") { $w4fMessage .= "$key: - <br>"; } else { $w4fMessage .= "<b>$key:</b> $val<br>"; } } } } // end while }//end else $w4fMessage = "<font face=verdana size=2>".$w4fMessage."</font></body></html>"; if (!mail($MailToAddress, $MailSubject, $w4fMessage, "From: $name <$email>\r\nReply-To: $name <$email>\r\nMessage-ID: <". md5(rand()."".time()) ."@". ereg_replace("www.","",$_SERVER["SERVER_NAME"]) .">\r\nMIME-Version: 1.0\r\nX-Priority: 3\r\nX-Mailer: PHP/" . phpversion()."\r\nX-MimeOLE: Produced By Web4Future Easiest Form2Mail v1.5\r\nBCc: $MailToCC\r\nContent-Type: text/html; charset=ISO-8859-1\r\nContent-Transfer-Encoding: 8bit\r\n")) { echo "Please Write Information True";} else { header("Location: ".$redirectURL); } ?> |
|
|
|
Mar 12 2005, 05:50 PM
Post
#12
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 208 Joined: 27-January 05 From: LI, New York Member No.: 3,448 |
Thats overly long and completcated. Mine works fine and I dont see the point in doing what your saying. Just having it the way I have it is alot simpler to understand.
|
|
|
|
Mar 13 2005, 02:55 AM
Post
#13
|
|
|
Privileged Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 618 Joined: 30-October 04 From: Philippines Member No.: 2,049 |
What version of PHP is the person using? I think the $_GLOBALS function is old. I think the person behind the script is creating a PHP Script from PHP 3.
|
|
|
|
Mar 13 2005, 03:18 AM
Post
#14
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 208 Joined: 27-January 05 From: LI, New York Member No.: 3,448 |
Yeah im learning from a PHP 5 book and some of that stuff doesnt look familar to me. I think its PHP 3 also.
|
|
|
|
Jan 8 2006, 07:33 AM
Post
#15
|
|
|
Hidden Secrets can't be told threw just words. One must feel what the other feels to truely understand... ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 1,523 Joined: 8-January 06 From: Sacramento California Member No.: 16,756 |
what if the contact.htm is contact.php ? because my site is php
|
|
|
|
Aug 27 2006, 11:04 AM
Post
#16
|
|
|
Member [Level 1] ![]() ![]() ![]() ![]() Group: Members Posts: 50 Joined: 25-August 06 Member No.: 28,897 |
Hi Guys,
First of all, i dissagre with you if you said that alexia's script was PHP 3. Remember $_GET, $_POST, $_SERVER, etc. as I know is need register_global to turned off. And register_global is turned off by default since PHP 4.1.2. I think he was used PHP > 4.1.x or PHP 5. May be you unfamiliar with that scripts because you didnt understand much about EMAIL HEADERS. On that script he wrote some EMAIL HEADERS like X-Mailer, X-Priority, Content/type: text/html (for email account that support HTML email) etc. |
|
|
|
Aug 28 2006, 02:45 AM
Post
#17
|
|
|
Premium Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 172 Joined: 2-August 06 From: North Carolina Member No.: 27,662 |
i like the script however, might i make one suggestion. Try making it into one file all together, it might look somthing like this
CODE <? if (!$_GET['send']) { ?> <form action="mailform.php?send=1" method="post"> <input type=hidden name=EmailTo value="You@mail.com"> <!-- // Change to your email address // --> Your Name: <input type=text name=Name><br> Subject: <input type=text name=Subject><br> Your Email: <input type=text name=Email><br> Your Site: <input type=text name=Site><br> Message: <br><textarea name=Message rows=6 cols=30></textarea><br> <input type=submit value="Send"> <input type=reset value="Reset"></form> <? } else { $Name = $_POST['Name']; $Subject = $_POST['Subject']; $Email = $_POST['Email']; $Site = $_POST['Site']; $Message=$_POST['Message']; $align = $_POST['align']; $to = "$EmailTo"; $subject = "$Subject"; $body = "$Message\n\n\n$Site\nBy: $Name"; $headers = "From: $Email\n"; $worked = @mail($to,$subject,$body,$headers); if($worked) { ?> <p>Your message has been sent to the webmaster. You should recieve a reply shortly. </p> <p><a href="index.php" target="_self">Go Back To Index?</a></p> <? } else { ?> <p>Your message was unable to be sent</p> <p><a href="java script: go.history(-1);">Click here to go back</a></p> <? } } ?> This is your exact script just made to work as one file instead of 3 seperate ones. You would name this mailform.php ( think that would work for albus' question since his site is php, my site is the same way) |
|
|
|
Jan 9 2008, 05:18 AM
Post
#18
|
|
|
Trap Double Mocha Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 2,360 Joined: 21-September 07 Member No.: 50,369 |
direct php e mail for unlimited email sending
Php Emailer/contact System Can I get a direct php e mailer to send plenty of emails to several people at a go. I don't have a web site, I am to send from the public computer. Go through the link below and see what I mean: Http://www.Trevisovolontariato.Org/readme.Php I will be grateful to hear from you soon John -john coleman |
|
|
|