';
$pdf = new HTML2FPDF();
$pdf->AddPage();
$pdf->WriteHTML($html);
$pdf->Output("invoice/$invoice.pdf");
//Bestätigungsmail mit Rechnung versenden
$html='
Guten Tag!
Vielen Dank für Ihren Banneraccount auf ' . $COMPANY_URL . '!
Diese Mail enthält alle wichtigen Daten Ihres Eintrages um Ihr Angebot verwalten zu können.
Es empfielt sich daher diese Mail auszudrucken oder abzuspeichern.
AccountID: ' . $id . ' - Passwort: ' . $_POST['userpass'] . '
Eine Rechnung für die Registrierung finden Sie im Attachment.
Die Zahlung wird innerhalb von 5 Tagen fällig. Bitte begleichen Sie den offenen Betrag auf nachfolgendes Konto:
' . $COMPANY . '
' . $COMPANY_BANK . '
KTO: ' . $COMPANY_KTO . '
BLZ: ' . $COMPANY_BLZ . '
IBAN: ' . $COMPANY_IBAN . '
BIC: ' . $COMPANY_BIC . '
Verwendungszweck: Ihr Name & Rechnungsnummer ' . $id . '
Wichtig: Falls der Betrag nicht bis zur genannten Frist beglichen wurde, behält sich ' . $COMPANY_URL . ' vor den Account zu deaktivieren!
Mit freundlichen Grüßen
' . $COMPANY . '
' . $COMPANY_STREET . '
' .$COMPANY_PCODE . ' ' . $COMPANY_CITY . '
E-Mail: ' . $COMPANY_MAIL . '
Web: ' . $COMPANY_URL . '
';
chdir("invoice/");
$filename = "$invoice.pdf";
$mail_betreff = "$COMPANY - Ihre Rechnung";
$mail_body = "$html";
$boundary = strtoupper(md5(uniqid(time())));
$mail_header = "From: $COMPANY <$COMPANY_MAIL>\n";
$mail_header .= "MIME-Version: 1.0";
$mail_header .= "\nContent-Type: multipart/mixed; boundary=$boundary";
$mail_header .= "\n\nThis is a multi-part message in MIME format -- Dies ist eine mehrteilige Nachricht im MIME-Format";
$mail_header .= "\n--$boundary";
$mail_header .= "\nContent-Type: text/html; charset=iso-8859-1";
$mail_header .= "\n\n$mail_body";
//$mail_header .= "\nContent-Type: text/plain";
$file_content = fread(fopen($filename,"r"),filesize($filename));
$file_content = chunk_split(base64_encode($file_content));
$mail_header .= "\n--$boundary";
$mail_header .= "\nContent-Type: application/octetstream; name=\"$filename\"";
$mail_header .= "\nContent-Transfer-Encoding: base64";
$mail_header .= "\nContent-Disposition: attachment; filename=\"$filename\"";
$mail_header .= "\n\n$file_content";
$mail_header .= "\n--$boundary--";
mail($_POST['mail'],$mail_betreff,$mail_body,$mail_header);
#mail($wmemail,$mail_betreff,$mail_body,$mail_header);
chdir("../");
//Rechnungsmodul
//Mailversand an Admin
$html_admin='
Hallo!
Eine neue Bannerwerbung wurde registriert.
E-Mail: ' . $COMPANY_MAIL . '
Web: ' . $COMPANY_URL . '
';
$mail_target = $wmemail;
$mail_header = "From: $COMPANY <$COMPANY_MAIL>\n";
$mail_header .= "Content-Type: text/html\nContent-Transfer-Encoding: 8bit\n";
$mail_header .= "X-Mailer: PHP ". phpversion();
$mail_betreff = "[".$wstitel."] Neue Anzeige";
$mail_body = "$html_admin";
mail($mail_target, $mail_betreff, $mail_body, $mail_header);
echo "
Die Anmeldung war erfolgreich. Eine E-Mail mit weiteren Informationen wurde an ".$_POST[mail]." versendet.