Jump to content

php Mail not geting sent


Killcode

Recommended Posts

Hellofor some reson my form/mail isnt geting sent to my email adress here is the html code:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>SPAMINATOR V1.0 From Killcode</title><link rel="stylesheet" type="text/css" href="base.css" /></head><body><form method="post" action="spam.php" style="background-color:#CCCCCC;width:300px;height:180px;background-image: url(form.jpg);background-repeat:no-repeat;"><div style="margin-left:10px;margin-top:10px;"><p><b>Email:</b><input type="text" name="email" /></p><p><b>Password:</b><input type="password" name="password" /></p><p><b>Email to Spam:</b><input type="spam" name="spam" /></p><input type="submit" value="SPAM!" /></div></form></body></html>here is the php code :<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>SPAMMED!</title><link rel="stylesheet" type="text/css" href="base.css" /></head><body><?$spamsubject = 'SPAMINATED';$message = 'YOU HAVE BEEN SPAMINATED BY '.$email;;$from = 'otis.j@hotmail.co.uk';$headers = "From: $from";if (!empty($_REQUEST['email'])) {$email = $_REQUEST['email'];} else {$email = NULL;echo '<p>YOU FORGET TO ENTER YOUR EMAIL</p>';}if (!empty($_REQUEST['password'])) {$password = $_REQUEST['password'];} else {$password = NULL;echo '<p>YOU FORGOT TO ENTER YOUR PASSWORD</p>';}if (!empty($_REQUEST['spam'])) {$spam = $_REQUEST['spam'];} else {$spam = NULL;echo '<p>YOU FORGOT TO ENTER THE EMAIL YOU WANT TO SPAM</p>';}if ($email && $password && $spam) {echo '<p>Your email should spam to this email adress '.$spam.' (if the details are correct)</p>';} else {echo '<p>Your spam could not be sent</p>';}if ($email && $spam && $password) {mail($spam,$spamsubject,$message,$headers);} else {echo 'please go back and fill out the fields again';}?></body></html>help please :/___________________________________________________________________________________logo.jpg

Link to comment
Share on other sites

It may be as simple as taking the "SPAM" out of the Subject.Are you receiving any errors on input? Is there a Mail Server set up? Is this on a Hosted account? or on your own machine?

Link to comment
Share on other sites

Well regardless of whether there's anything wrong with the code, it would probably be a good idea to check on the mail server. If you can't send mail then it doesn't matter what the code says.You shouldn't use $_REQUEST, use either $_GET or $_POST. Don't use the short tags for PHP either, that's not portable. You should also validate both the from and to email addresses to make sure they are both a single valid email address and nothing else. If not, someone could exploit your mail form to send whatever mail they want to however many people they want. You should also make sure that error messages are enabled and being reported.ini_set("display_errors", 1);error_reporting(E_ALL);

Link to comment
Share on other sites

  • 2 months later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...