Я недавно создал почтовую форму PHP POST, и теперь я изменил веб-сайт с http на https (ssl).Проблема в том, что с тех пор я получаю пустые письма.нормальное тело есть, но переменные пусты.Может кто-нибудь помочь мне, я не могу найти проблему ...
Заранее спасибо.
Вот код:
<div class="title1">
<div><br /><?php
// EDIT THE 2 LINES BELOW AS REQUIRED
$email_to = "hallo@73bb.de";
$email_subject = "73BB Reservierung";
//Normale Felder
$vorname = $_POST['vorname'];
$nachname = $_POST['nachname'];
$email = $_POST['email'];
$phone = $_POST['phone'];
$amount = $_POST['amount'];
$date = $_POST['date'];
$time = $_POST['time'];
$nachricht = $_POST['nachricht'];
$body = urlencode('' . "\n" . '');
//Checkboxen
$email_message = "Reservierungsdetails:\n<br /> \n<br />";
function clean_string($string) {
$bad = array("content-type","bcc:","to:","cc:","href");
return str_replace($bad,"",$string);
}
$email_message .= "Vorname: ".$vorname."<br />"."Nachname: ".$nachname."<br />"."Telefonnummer: ".$phone."<br />"."Personen: ".$amount."<br />"."Datum: ".$date."<br />"."Uhrzeit: ".$time."<br />"."Nachricht: ".$nachricht."<br /><br /><br />";
// create email headers
require 'phpmailer/PHPMailerAutoload.php';
$mail = new PHPMailer;
//$mail->SMTPDebug = 3; // Enable verbose debug output
$mail->isSMTP(); // Set mailer to use SMTP
$mail->Host = ''; // Specify main and backup SMTP servers
$mail->SMTPAuth = true; // Enable SMTP authentication
$mail->Username = ''; // SMTP username
$mail->Password = ''; // SMTP password
$mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted
$mail->Port = 587; // TCP port to connect to
$mail->setFrom('', $nachname);
$mail->addAddress('', '73 Burger. Bar.'); // Add a recipient
$mail->addReplyTo($Email, 'eMail');
$mail->Subject = 'Reservierung via 73bb.de';
$mail->Body = $email_message;
$mail->AltBody = $email_message;
if(ctype_alpha($vorname)) { echo 'Es gab ein Fehler bei Ihrer Reservierung, bitte versuchen Sie es erneut.' ; }
else{
if(!$mail->send()) {
echo 'Die Nachricht konnte nicht gesendet werden, bitte versuchen Sie es erneut.';
echo 'Email Error: ' . $mail->ErrorInfo;
} else {
echo 'Die Reservierung wurde erfolgreich abgesendet!';
}
}
?></div></div>