|
|
|
|
![]() ![]() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members
Posts: 310 Joined: 9-February 05 From: Italian Member No.: 3,677 |
Post
#11
Mar 11 2005, 01:02 PM
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); } ?> |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members
Posts: 208 Joined: 27-January 05 From: LI, New York Member No.: 3,448 |
Post
#12
Mar 12 2005, 05:50 PM
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.
|
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members
Posts: 623 Joined: 30-October 04 From: Philippines Member No.: 2,049 |
Post
#13
Mar 13 2005, 02:55 AM
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.
|
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members
Posts: 208 Joined: 27-January 05 From: LI, New York Member No.: 3,448 |
Post
#14
Mar 13 2005, 03:18 AM
Yeah im learning from a PHP 5 book and some of that stuff doesnt look familar to me. I think its PHP 3 also.
|
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members
Posts: 1,522 Joined: 8-January 06 From: Sacramento California Member No.: 16,756 myCENT:ZERO |
|
![]() ![]() ![]() Group: Members
Posts: 49 Joined: 25-August 06 Member No.: 28,897 |
Post
#16
Aug 27 2006, 11:04 AM
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. |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members
Posts: 169 Joined: 2-August 06 From: North Carolina Member No.: 27,662 |
Post
#17
Aug 28 2006, 02:45 AM
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) |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members
Posts: 5,876 Joined: 21-September 07 Member No.: 50,369 |
Post
#18
Jan 9 2008, 05:18 AM
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 |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members
Posts: 5,876 Joined: 21-September 07 Member No.: 50,369 |
Post
#19
Feb 21 2008, 04:56 AM
Sending HTML email Php Emailer/contact System Hi, Is it possible to send email in HTML format using php script? Thanks, Jolly -reply by Jolly |
![]() ![]() Group: Members
Posts: 25 Joined: 2-February 07 Member No.: 38,169 |
Post
#20
Mar 6 2008, 11:58 AM
hey i want the script to redirect to another page after the email has been sent successfully, how to do that in PHP? |
![]() ![]() |
Similar Topics
| Topic Title | Replies | Topic Starter | Views | Last Action | |||
|---|---|---|---|---|---|---|---|
![]() |
20 | BuffaloHELP | 433 | 19th October 2008 - 01:41 AM Last post by: BuffaloHELP |
|||
![]() |
1 | flashyflashy | 740 | 1st August 2004 - 06:19 AM Last post by: Florisjuh |
|||
![]() |
2 | georgewar | 439 | 6th August 2004 - 03:33 PM Last post by: Xenon |
|||
![]() |
2 | georgewar | 381 | 4th August 2004 - 12:32 PM Last post by: Spectre |
|||
![]() |
10 | ill | 906 | 19th August 2004 - 01:29 PM Last post by: odomike |
|||
![]() |
0 | DjLuki | 905 | 4th July 2006 - 07:19 AM Last post by: DjLuki |
|||
![]() |
1 | dundun2007 | 397 | 3rd September 2004 - 02:24 AM Last post by: serverph |
|||
![]() |
6 | Critical_Impact | 437 | 10th September 2004 - 07:20 PM Last post by: groentjuh |
|||
![]() |
5 | Critical_Impact | 396 | 11th September 2004 - 12:19 AM Last post by: Critical_Impact |
|||
![]() |
21 | googlue | 2,007 | 10th December 2004 - 11:47 AM Last post by: antitrust |
|||