|
|
|
|
![]() ![]() |
May 2 2005, 11:57 PM
Post
#1
|
|
|
Newbie [ Level 2 ] Group: Banned Posts: 18 Joined: 2-May 05 Member No.: 4,656 |
Notice from m^e:
Repeat post. Credits reduced by 5 days. Learn to USE THE SEARCH BUTTON before you make such posts.
did you want to have in your web site mail form that allow the user to send mails to anther mail from his mail e.g. the compose in yahoo CODE <body> <form name="email" method="post"> <table align="center"> <tr> <td>from</td> <td align="right"><input type="text" size="60" name="from" /></td> </tr> <tr> <td>to</td> <td align="right"><input type="text" size="60" name="to" /></td> </tr> <tr> <td>cc</td> <td align="right"><input type="text" size="60" name="cc" /></td> </tr> <tr> <td>bcc</td> <td align="right"><input type="text" size="60" name="bcc" /></td> </tr> <tr> <td>subject</td> <td align="right"><input type="text" size="60" name="subject" /></td> </tr> <tr> <td colspan="2"> <textarea name="body" cols="60" rows="10"> </textarea> </td> </tr> <tr> <td colspan="2" align="right"> <input type="submit" value="send" /> </td> </tr> </table> </form> <? function param($Name) { global $HTTP_POST_VARS; if(isset($HTTP_POST_VARS[$Name])) return($HTTP_POST_VARS[$Name]); return(""); } $from = param("from"); $to = param("to"); $cc = param("cc"); $bcc = param("bcc"); $subject = param("subject"); $body = param("body"); if($from != "" && $to != "" && $subject != "") { $headers = "From: " . $from . "\n" . "To: " . $to . "\n" . "CC: " . $cc . "\n" . "BCC: " . $bcc; mail("", $subject, $body, $headers); } ?> </body> </html> that`s all This post has been edited by microscopic^earthling: May 3 2005, 12:11 PM |
|
|
|
May 3 2005, 11:48 AM
Post
#2
|
|
|
Advanced Member Group: Members Posts: 173 Joined: 22-March 05 From: Hyderabad,India Member No.: 3,155 |
Does the above code have any risks?? Like can it be used to spoof e-mail addresses??
|
|
|
|
May 3 2005, 12:09 PM
Post
#3
|
|
|
PsYcheDeLiC dR3aMeR Group: Admin Posts: 2,242 Joined: 29-January 05 From: Nakorn Chaisri, Thailand Member No.: 2,411 myCENTs:84.36 |
Spoof as in you can enter any random email address - as you can with any form mailers... there's no certain way to check that it is your authentic address unless you put some email activation mechanism following the form feedback... but then that's a total overkill when you're using this form to simply submit comments. Email verification is good for only forum & site memberships...
Anyway, I think this code is useless at this point, coz we've already posted this 2-3 times before in both javaScript and PHP sections.. While it's a good attempt, this shows that people still DO NOT use the SEARCH button before posting. One of the previous articles can clearly be found under PHP Form to Email title. Credits adjusted for this.... |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 5th December 2008 - 02:26 PM |