126) ) { $h2 = floor($dec/16); $h1 = floor($dec%16); $c = $escape.$hex["$h2"].$hex["$h1"]; } if ( (strlen($newline) + strlen($c)) >= $line_max ) { $output .= $newline.$escape.$eol; $newline = ""; } $newline .= $c; } $output .= $newline; if ($j\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.="\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.="\n"; $mymail.=""; $mymail.="\n"; $mymail.="\n"; while (list($key, $val) = each ($HTTP_POST_VARS)) { switch ($key) { case "x": case "y": case "fgwemail": case "fgwsubject": case "fgwreturnurl": break; default: $mymail.=""; $mymail.="\n"; $mymail.="\n"; $mymail.="\n"; } } $mymail.="
The following message was sent to you:
".$key.":".$val."
\n"; return $mymail; } function createTextMail() { global $HTTP_POST_VARS; reset($HTTP_POST_VARS); $mymail=""; while (list($key, $val) = each ($HTTP_POST_VARS)) { switch ($key) { case "x": case "y": case "fgwemail": case "fgwsubject": case "fgwreturnurl": break; default: $mymail.=$key." "; $mymail.=$val."\n"; } } $mymail.="\n"; return $mymail; } function createMimeMail() { $mymime="This is a multi-part message in MIME format.\n\n"; $mymime.="----WEB2DATEGATEWAY\n"; $mymime.="Content-Type: text/plain;\n\tcharset=\"iso-8859-1\"\n"; $mymime.="Content-Transfer-Encoding: quoted-printable\n\n"; $mymime.=quoted_printable_encode(createTextMail())."\n"; $mymime.="----WEB2DATEGATEWAY\n"; $mymime.="Content-Type: text/html;\n\tcharset=\"iso-8859-1\"\n"; $mymime.="Content-Transfer-Encoding: quoted-printable\n\n"; $mymime.=quoted_printable_encode(createHTMLMail())."\n"; $mymime.="----WEB2DATEGATEWAY--\n"; return $mymime; } function deSlash(&$element) { // Für Stripslash $element=stripslashes($element); } // Hauptprogramm // Die magischen Quotes eliminieren... reset($HTTP_POST_VARS); if (get_magic_quotes_gpc()) { array_walk($HTTP_POST_VARS, "deSlash"); } $fgwemail=postVars("fgwemail"); $fgwsubject=postVars("fgwsubject"); $fgwreturnurl=postVars("fgwreturnurl"); if (!$fgwemail) { die ("ERROR: NO RETURN-EMAIL-ADRESS"); } if (!$fgwreturnurl) { die ("ERROR: NO RETURN-URL"); } mail ($fgwemail, $fgwsubject, createMimeMail(), "MIME-Version: 1.0\nContent-Type: multipart/alternative;\n\tboundary=\"--WEB2DATEGATEWAY\"\nX-Mailer: web to date Gateway Version 1.0"); header("Location: ".$fgwreturnurl); ?>