I created a contact formular with html and php. I already installed xampp and everything. In the php.ini file I set up the smtp server. When I try the contact formular than this error in line 15 show up:
Warning: mail(): SMTP server response: 530 5.7.0 Authentication required in C:\xampp\htdocs\mdn\mail.php on line 15
Error!
This is my mail.php file:
<?php
if(isset($_POST['name']))
$name = $_POST['name'];
if(isset($_POST['email']))
$email = $_POST['email'];
if(isset($_POST['message']))
$message = $_POST['message'];
if(isset($_POST['subject']))
$subject = $_POST['subject'];
$content = "From: $name \n Email: $email \n Message: $message";
$recipient = "behar@zenuni.ch";
$mailheader = "From: $email \r\n";
mail($recipient, $subject, $content, $mailheader) or die ("Error!");
echo "Email sent!";
?>
Can somebody help me?