こんにちは私はこのerorrsを取得していますが、私はどこに問題があるのかわかりません。 私はどんなアドバイスにも感謝します。phpmailer未定義の変数
注意:未定義の変数:Cでヘッダー:\ WAMP \ WWW \ restaurace \ kongresform.phpライン上の59
注意:未定義の変数:Cでmessageb:\ WAMP \ WWW \ restaurace \ kongresform.phpオンライン72
if (empty($errors)) { //If everything is OK
// send an email
// Obtain file upload vars
// Headers
$headers.= "From: $emailfr \n";
$headers.= "BCC: $emailcc ";
// creates a boundary string. It must be unique
$semi_rand = md5(time());
$mime_boundary = "==Multipart_Boundary_x{$semi_rand}x";
// Add the headers for a file attachment
$headers .= "\nMIME-Version: 1.0\n" .
"Content-Type: multipart/mixed;\n" .
"boundary=\"{$mime_boundary}\"";
$messageb.="Dobrý den,<br>\n";
$messageb.="Jméno a přijímení: <b>".$namefrom."</b><br>\n";
$messageb.="Email: <b>".$email."</b><br>\n";
$messageb.="Prostor pro poznámky: ".$message."<br><br>\n";
$messageb.="S pozdravom<br>\n";
$messageb.="tým Fincentrum Reality<br>\n";
$messageb.="<br>\n";
$messageb.="========================================================================<br>\n";
$messageb.="Tento e-mail byl odeslaný automaticky z webu. Prosím, neodpovídejte na něj.<br>\n";
$messageb.="========================================================================<br>\n";
$subject="Potvrzení\n";
// PHP Mailer
$mail = new PHPMailer;
//$mail->SMTPDebug = 3; // Enable verbose debug output
$mail->isSMTP(); // Set mailer to use SMTP
$mail->Host = 'smtp.gmail.com'; // Specify main and backup SMTP servers
$mail->SMTPAuth = true; // Enable SMTP authentication
$mail->Username = '[email protected]'; // SMTP username
$mail->Password = 'mattonirestaurace'; // SMTP password
$mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted
$mail->Port = 587; // TCP port to connect to
$mail->setFrom($emailfr);
$mail->addAddress($to); // Add a recipient
//$mail->addReplyTo('[email protected]', 'Information');
//$mail->addCC($emailcc);
$mail->addBCC($emailcc);
//$mail->addAttachment('/var/tmp/file.tar.gz'); // Add attachments
//$mail->addAttachment('/tmp/image.jpg', 'new.jpg'); // Optional name
$mail->isHTML(true); // Set email format to HTML
$mail->Subject = $subject;
$mail->Body = $messageb;
$mail->CharSet = 'UTF-8';
//$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
if(!$mail->send()) {
exit("Mail could not be sent. Sorry! An error has occurred, please report this to the website administrator.\n");
//echo 'Mailer Error: ' . $mail->ErrorInfo;
}
else {
echo '<div id="formfeedback"><h3>Děkujeme za Vaší zprávu!</h3><p>'. $thanksmessage .'</p></div>';
unset($_SESSION['yellloForm']);
print_form();
} // end of if !mail
}
へ
変更
へと
あなたはバリを初期化していませんそれらを追加する前にables。それぞれの最初のものを '='の代わりに '=' –