LiamProductions Posted August 11, 2007 Share Posted August 11, 2007 Hey, I was wondering if these two codes actually work reason i can't test my self is because i don't have STMP server or whatever on my localhost and my web host is down Heres both codes: friends.html: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> <meta name="author" content="Liam"> <title>Liams friends message</title> </head> <body> <table border="0"> <tr> <form method="post" action="success.php"> <td><b>To:</td></b><td><input type="text" name="to"></td> <tr /> <tr> <td> <b>From: </b></td><td><input type="text" name="from"></td> </tr> <tr> <td><center></center><input type="submit" value="Invite Friend!"></center></td></tr></table> </form> </body> </html> AND... success.php: <?php extract($_POST); echo "Your invite has been sent to $to"; $subject = "Your friend has invited you!"; $message = "Your friend $from has invited you to join http://www.liamproductions.com Click the link to go there now!"; $headers = 'From: friends@liamproductions.com' . "\r\n" . 'Reply-To: msn@liamproductions.com' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); mail($to, $subject, $message, $headers); ?> Would that come to someones email like From: friends@liamproductions.com Reply to: msn@liamproductions.com Subject: Your friend has invited you! Message: Your friend [FROM FIELD ON FIRST PAGE] has invited you to join http://www.liamproductions.com Click the link to go there now! Would it? Quote Link to comment https://forums.phpfreaks.com/topic/64437-does-this-mail-function-work/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.