mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Fixed some mailsettings
This commit is contained in:
12
php/mail.php
12
php/mail.php
@@ -6,12 +6,16 @@
|
||||
$message = htmlspecialchars($_POST['message']);
|
||||
$headers = "From: " . $from . "\r\n";
|
||||
|
||||
$result = mail("contact@zoff.no", "Contact from form", $message, $headers);
|
||||
if(filter_var($from, FILTER_VALIDATE_EMAIL) && $message != ""){
|
||||
$result = mail("contact@zoff.no", "Contact from form", $message, $headers);
|
||||
|
||||
if($result == FALSE){
|
||||
echo "failure";
|
||||
if($result == FALSE){
|
||||
echo "failure";
|
||||
}else{
|
||||
echo "success";
|
||||
}
|
||||
}else{
|
||||
echo "success";
|
||||
echo "failure";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user