header('Location: ../index.php');
const sendData = (formData) => {
fetch('./mail.php', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(formData)
}).then((response) => {
// something
}).catch(error => console.error(error))
}