This question already has an answer here:
So my php code worked fine for months on end. It was set up to receive requests through spiceworks and now the the submission form will show it submitted but our IT team does not receive any emails anymore.
<?php
if (isset($_POST['submit'])) {
$host = "ssl://smtp.example.com";
$name = $_POST['name'];
$subject = $_POST['subject'];
$mailFrom = $_POST['email'];
$message = $_POST['message'];
$mailTo = "ithelpdesk@example.com";
$headers = "From: ".$mailFrom;
$txt = "You have received an e-mail from ".$name.".\\n\\n".$message;
mail($mailTo, $subject, $txt, $headers);
header("Location: helpdesk.php?mailsend");
}
the "Example" is switched out with personal info. but the code was working fine and then just stopped. would love any guidance as i am very new to php and coding.
Aucun commentaire:
Enregistrer un commentaire