All I'm trying to do is just send an extremely basic e-mail to my host mail. The hosting service I'm currently using is https://www.ionos.com/ and I have a registered email with it. My website is already hosted and running. The code I'm trying to execute is this:
index.php
<form class="" action="/contactform.php" method="post">
<input type="text" name="name" value="">
<input type="text" name="mail" value="">
<textarea name="message"></textarea>
<button type="submit" name="submit">Submit</button>
</form>
contactform.php
if (isset($_POST['submit'])) {
$name = $_POST['name'];
$mail = $_POST['mail'];
$message = $_POST['message'];
$mailTo = 'info@installnewcooker.com';
$headers = 'From '.$mail;
$text = "You've received an e-mail from ".$name."\n\n".$message;
mail($mailTo, $name, $text, $headers);
header("Location: ../index.php");
}
The e-mail I'm trying to send the message is info@installnewcooker.com as is seen in the code. Sadly I'm not receiving anything and I don't have any clue as to why. The PHP code is not giving any errors.