function SendMail(){
require_once('PHPMailer/class.phpmailer.php');
require_once('PHPMailer/class.smtp.php');
//$mailsmtpauth = true;
//$mailhost = "xxxx"; //SMTP Host name
//$mailusername = "xxxx"; // SMTP Login
//$mailpassword = "xxxx"; // SMTP Password
$mail = new PHPMailer();
//$mail->CharSet = 'UTF-8';
//$mail->IsSMTP();
//$mail->Host = $mailhost;
$mail->SMTPDebug = 2; // Kann man zu debug Zwecken aktivieren
//$mail->SMTPAuth = true;
//$mail->SMTPSecure = "tls"; // sets the prefix to the servier
//$mail->Port = 587; // set the SMTP port for the GMAIL
//$mail->Username = $mailusername;
//$mail->Password = mailpassword;
$mail->addAttachment("/snapshots/Doorbell_1.jpg");
$mail->addAttachment("/snapshots/Doorbell_2.jpg");
$frommail = "
[email protected]";
$fromname = "
[email protected]";
$mail->SetFrom($frommail, $fromname);
$address = "Empfä
[email protected]";
$adrname = "Empfä
[email protected]";
$mail->AddAddress($address, $adrname);
$mail->Subject = "Tuersprechstelle";
$mail->Body = "Es hat geklingelt";
if(!$mail->Send()) {
echo "Mailer Error: " . $mail->ErrorInfo;
echo "\n";
} else {
echo "Message sent!\n";
}