me trying to understand this code function from last few days but still ifffffffffffffffffffffff. plz help me;
1: we use php code to send emails how the email send without smtp authentication.
2: second one is if my hosting plan allow me to send 50 emails per day and user email me through contact us page more than 50 emails than what happened (
suspended a/c kay elawa :p )
contact us page made by this code
can user can send me unlimited emails plz plz waiting for the positive response
Code: Select all
<?php
$site_name = "abc";
$admin_email = "info@domainname.com";
$url = "www.domainname.com";
?>
Code: Select all
<?php
if(!$_POST['submit']){
echo "<table align=center border=0 cellspacing=0><tr><td>";
echo "
<h2>Contact Form</h2><br>
Your comments are welcome.<br /><br>
Please fill out this form and we will try to respond to you in as timely manner as possible.
<br /><br /><br />
<table class=table align=center cellspacing=0 cellpadding=5 border=0>
<form action=contactus.php method=post>
<tr><td bgcolor=#647A4E width=33%><b>Your Name:</b></td><td bgcolor=#647A4E><input type=text name=name></td></tr>
<tr><td bgcolor=#647A4E><b>Email Address:</b></td><td bgcolor=#647A4E><input type=text name=email></td></tr>
<tr><td bgcolor=#647A4E><b>Subject:</b></td><td bgcolor=#647A4E><input type=text name=subject size=30";
if(isset($_GET['subject'])){
$subject = $_GET['subject'];
echo "value=\"$subject\"";
}
echo "></td></tr>
<tr><td colspan=2 bgcolor=#647A4E> <b>Message:</b><br /><center><textarea name=body rows=10 cols=55>";
if(isset($_GET['body'])){
$body = $_GET['body'];
echo "$body";
}
echo "</textarea></center></td></tr>
<tr><td colspan=2 bgcolor=#647A4E><center><input type=submit class=submit name=submit value=\"Send Message\"></center></td></tr>
</form>
</table>";
}
else{
if(!$_POST['subject'] || !$_POST['body']){
echo "<span class=warning>You must fill out the Subject and the Message before this form is submitted.</span>";
}
else{
$name = $_POST['name'];
$email = $_POST["email"];
$subject = $_POST['subject'];
$body = $_POST['body'];
$subj = "Contact from $name @ $site_name: $subject";
$message = "$body\n\nSent by $name: $email";
$email_info = "From: $email";
mail($admin_email, stripslashes($subj), stripslashes($message), stripslashes($email_info));
echo "<center>Thank you, Your message has been sent.</center>";
}
}
echo "</td></tr></table>";
?>