First, it's very inconvenient for those people who use web-based mail such as Yahoo!, Hotmail, or Gmail because that darn Micro$oft Outlook program comes up if one accidently click the link.
Second, you are very suseptible to spam bots because they scan your HTML source code for anything with the same pattern as an email address and add it to their database. If you are pretty popular on Google, you can expect mails like "Unlimited Bandw1dth!!1" or "Cows F0und 1n 0utersp4ace!!" in your inbox soon.
The Tutorial
Make a new file called mail.php in Notepad and copy and paste the following code:
<html>
<head>
<title>My first email script</title>
</head>
<body>
<?php
if($content)
{
$from = $_POST["from"]; //gets the name of the person
$email = $_POST["email"]; //gets their email address
$content = "This message is from $from whose email address is $email.\r\n-----------\r\n "; //little intro of your email message that you will see in your inbox
$content = $content . $_POST["content"]; //concatenates the intro with the real content
$content = wordwrap($content, 70); //message must be no longer than 70 characters per line (PHP rule), so we wrap it
mail('snlildude87@gmail.com', 'Someone Sent You Something!!!', $content); //first argument = your email address; second argument = subject of email (make it very catchy so you won't miss it); third argument = the content (DO NOT CHANGE THIS!!)
echo "Your message has been sent, and if I like you, then you will receive a reply. Thank you."; //what you want to tell the user after sending
}
?>
<form method="post" action="mail.php">
<p>Name: <input type="text" name="from" title="Your name"></p>
<p>Email: <input type="text" name="email"></p>
<p>Message: <textarea rows="5" cols="15" name="content"></textarea></p>
<input type="submit" value="Submit">
</form>
</body>
</html>That's it! If you want to see the email script/form in action, I have set one up on my site here: http://sang.trap17.com/aboutme.htm
Also, when someone sends you something with my script, you have to manually type in their email address. So after someone sends you a message, you will get the following in your email:
Quote
-----------
[content of message]
You will have to copy whatever their email address is, and go to Compose in your mail provider to send them a reply. It's a hassle, but I promise, it won't take more than 1 minute.
If you have any questions, concerns, comments, or ideas, feel free to post them below. Thanks and good luck!!

Help

Add Reply



MultiQuote

















