• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

php form mail not working

D

Deej

Guest
Hi, I can't seem to get php form mail to work. I've tried the same script on another server and it works fine so I'm assuming it's something to do with plesk?

It's just a basic script:

form.php
<form action="process.php" method="post">
Name: <input type="text" name="name" size="20" maxlength="20" /><br />
Email: <input type="text" name="email" size="30" maxlength="30" /><br />
Subject: <input type="text" name="subject" size="30" maxlength="30" /><br />
Text:<textarea name="text" name="text" cols="50" rows="10"></textarea><br />
<input type="submit" name="submit" value="Send" />
</form>

process.php
<?php
@extract($_POST);
$name = stripslashes($name);
$email = stripslashes($email);
$subject = stripslashes($subject);
$text = stripslashes($text);
mail('[email protected]',$subject,$text,"From: $name <$email>");
header("location:form.php");
?>

Any suggestions?
Thanks.
 
Back
Top