phpmailer undefined variable : <p>Hi i am getting this erorrs but i dont know where the problem is.
I´ill be grateful for any advice.</p>

<p>Notice: Undefined variable: headers in C:\wamp\www\restaurace\kongresform.php on line 59</p>

<p>Notice: Undefined variable: messageb in C:\wamp\www\restaurace\kongresform.php on line 72</p>

<pre><code>  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,&lt;br&gt;\n";

          $messageb.="Jméno a přijímení: &lt;b&gt;".$namefrom."&lt;/b&gt;&lt;br&gt;\n";
          $messageb.="Email: &lt;b&gt;".$email."&lt;/b&gt;&lt;br&gt;\n";

          $messageb.="Prostor pro poznámky: ".$message."&lt;br&gt;&lt;br&gt;\n";
          $messageb.="S pozdravom&lt;br&gt;\n";
          $messageb.="tým Fincentrum Reality&lt;br&gt;\n";
          $messageb.="&lt;br&gt;\n";
          $messageb.="========================================================================&lt;br&gt;\n";
          $messageb.="Tento e-mail byl odeslaný automaticky z webu. Prosím, neodpovídejte na něj.&lt;br&gt;\n";
          $messageb.="========================================================================&lt;br&gt;\n"; 

         $subject="Potvrzení\n";





        // PHP Mailer
        $mail = new PHPMailer;

//$mail-&gt;SMTPDebug = 3;                               // Enable verbose debug output

$mail-&gt;isSMTP();                                      // Set mailer to use SMTP
$mail-&gt;Host = 'smtp.gmail.com';  // Specify main and backup SMTP servers
$mail-&gt;SMTPAuth = true;                               // Enable SMTP authentication
$mail-&gt;Username = 'mattoni.resta.test@gmail.com';                 // SMTP username
$mail-&gt;Password = 'mattonirestaurace';                           // SMTP password
$mail-&gt;SMTPSecure = 'tls';                            // Enable TLS encryption, `ssl` also accepted
$mail-&gt;Port = 587;                                    // TCP port to connect to

$mail-&gt;setFrom($emailfr);
$mail-&gt;addAddress($to);     // Add a recipient
//$mail-&gt;addReplyTo('webform@fincentrum.com', 'Information');
//$mail-&gt;addCC($emailcc);
$mail-&gt;addBCC($emailcc);

//$mail-&gt;addAttachment('/var/tmp/file.tar.gz');         // Add attachments
//$mail-&gt;addAttachment('/tmp/image.jpg', 'new.jpg');    // Optional name
$mail-&gt;isHTML(true);                                  // Set email format to HTML

$mail-&gt;Subject = $subject;
$mail-&gt;Body    = $messageb;
$mail-&gt;CharSet = 'UTF-8';
//$mail-&gt;AltBody = 'This is the body in plain text for non-HTML mail clients';






        if(!$mail-&gt;send()) {
            exit("Mail could not be sent. Sorry! An error has occurred, please report this to the website administrator.\n");
            //echo 'Mailer Error: ' . $mail-&gt;ErrorInfo;
        } 
        else {
            echo '&lt;div id="formfeedback"&gt;&lt;h3&gt;Děkujeme za Vaší zprávu!&lt;/h3&gt;&lt;p&gt;'. $thanksmessage .'&lt;/p&gt;&lt;/div&gt;';
            unset($_SESSION['yellloForm']);
            print_form();

        } // end of if !mail

    }
</code></pre>
