ini_set('display_errors', 0);
include('classes/phpmailer/class.phpmailer.php');
if ($_POST[action]=="handleform")
{
if ($_POST[name]=="")
{
$error1 = 1;
}
if ($_POST[phone]=="")
{
$error2 = 1;
}
if ($_POST[comment]=="")
{
$error3 = 1;
}
if (!$error1 && !$error2 && !$error3)
{
$text = "";
$text .= "Beste ".$_POST[name].",
";
$text .= "Bedankt voor het invullen van het contactformulier op onze website.
";
$text .= "Met vriendelijke groet,
Loket Personenalarmering
";
$text .= "
Naam: ".$_POST[name];
if ($_POST[address]) { $text .= "
Adres: ".$_POST[address]; }
$text .= "
Telefoon: ".$_POST[phone];
if ($_POST[email]) { $text .= "
Email: ".$_POST[email]; }
$text .= "
Bericht: ".nl2br($_POST[comment]);
$text .= "";
$mail = new PHPMailer(true);
$body = $text;
$body = preg_replace('/\\\\/','', $body);
//$mail->IsSMTP();
$mail->Host = "localhost";
$mail->AddReplyTo("info@loketpa.nl","Loket Personenalarmering");
$mail->From = "info@loketpa.nl";
$mail->FromName = "Loket Personenalarmering";
$to = "info@loketpa.nl";
$mail->addAddress($to);
// BCC disabled on 19-4-2019 TVB
// $to = "bcc@connexx.nl";
// $mail->AddBCC($to);
$mail->Subject = "Contactformulier Loket Personenalarmering";
$mail->AltBody = "To view the message, please use an HTML compatible email viewer!";
$mail->WordWrap = 80;
$mail->MsgHTML($body);
$mail->IsHTML(true);
$mail->Send();
$succes = 1;
}
}
?>
Loket Personenalarmering - Contact
if ($succes=="1") {
?>
}
?>