My client made upgrade of php version in his website and now contact form in hid website doesn’t send content of emails. User get email but only with footer part with info from which system was email send but content miss.
How can I solve it please?
<?php
require_once("CMS/library/framework.php");
require_once("CMS/library/standalone.inc.php");
$id = intval($_POST["id"]);
$lastname = $_POST["nachname"];
$firstname = $_POST["vorname"];
$company = $_POST["firma"];
$street = $_POST["strasse"];
$city = $_POST["ort"];
$plz = $_POST["plz"];
$tel = $_POST["telefon"];
$email = $_POST["mail"];
$message = $_POST["msg"];
$captcha = $_POST["captcha"];
// error handling
$c = new captcha;
$errors = "";
if(empty($lastname)) $errors .= "Bitte geben Sie Ihren Nachnamen an.<br />";
if(empty($firstname)) $errors .= "Bitte geben Sie Ihren Vornamen an.<br />";
if(empty($street)) $errors .= "Bitte geben Sie Ihre Straße an.<br />";
if(empty($plz)) $errors .= "Bitte geben Sie Ihre PLZ an.<br />";
if(empty($city)) $errors .= "Bitte geben Sie Ihren Wohnort an.<br />";
if(!is_valid_email_address($email)) $errors .= "Bitte geben Sie eine gültige E-Mail Adresse an.<br />";
if(!$c->check($captcha)) $errors .= "Sie haben den Sicherheitscode falsch eingegeben.<br />";
// get seminar
$query = $db->query("SELECT titel FROM ".prefix."_seminare WHERE id = '$id'");
$row = $db->fetch_assoc($query);
$seminar = $row["titel"];
// error handling
if(!empty($errors)){
die($errors);
}else{
// sendmail
$mail = new mail;
$mail->from = $globalmailfrom;
//$mail->to = $globalmailto;
$mail->to = "praguedev@gmail.com";
$mail->replyto = $email;
$mail->subject = "Neue Seminaranmeldung";
$mail->message = "Es liegt eine neue Seminaranmeldung vor!
Seminar: $seminar
Name: $firstname $lastname
E-Mail: $email
Firma: $company
Straße: $street
Ort: $plz $city
Telefon: $tel
$message";
$mail->send();
// bestätigung
$mail->to = $email;
$mail->replyto = $globalmailfrom;
$mail->subject = "Ihre Seminaranmeldung bei COWIMO";
$mail->message = "Sehr geehrte/r $firstname $name,
hiermit bestätigen wir Ihnen die Buchung des Seminars $seminar.
Weitere Informationen erhalten Sie in Kürze per E-Mail.
Ihr COWIMO-Team.";
$mail->send();
}
header("location: seminare_$id.php?action=buchen&success=success");
?>
Run code snippetCopy snippet to answer