Hello,
I have a PHP script intended to send an e-mail to someone. It works fine and everything, but throws an "Error" message. Even though it works.
<?php
$name = $_POST['name'];
$email = $_POST['email'];
$subject = $_POST['subject'];
$message = $_POST['message'];
$mailheader = "From:".$name."<".$email.">\r\n";
$recipient = "
[email protected]";
mail($recipient, $subject, $message, $mailheader) or die("Error!");
echo'
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Contact form</title>
<link href="https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600&family=Poppins&display=swap" rel="stylesheet">
<link rel="stylesheet" href="style.css">
</head>
</html>
';?>