From 9dceece06fbdc98add6f76f0b1aec05891a394c4 Mon Sep 17 00:00:00 2001 From: Markus Warg Date: Mon, 29 Mar 2010 09:54:06 +0200 Subject: remove cacert/ prefix --- includes/mysql.php.sample | 103 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 includes/mysql.php.sample (limited to 'includes/mysql.php.sample') diff --git a/includes/mysql.php.sample b/includes/mysql.php.sample new file mode 100644 index 0000000..88ddcb2 --- /dev/null +++ b/includes/mysql.php.sample @@ -0,0 +1,103 @@ +\r\n"); + $InputBuffer = fgets($smtp, 1024); + $bits = explode(",", $to); + foreach($bits as $user) + fputs($smtp, "RCPT TO: <".trim($user).">\r\n"); + $InputBuffer = fgets($smtp, 1024); + fputs($smtp, "DATA\r\n"); + $InputBuffer = fgets($smtp, 1024); + fputs($smtp, "X-Mailer: CAcert.org Website\r\n"); + fputs($smtp, "X-OriginatingIP: ".$_SERVER["REMOTE_ADDR"]."\r\n"); + fputs($smtp, "Sender: $errorsto\r\n"); + fputs($smtp, "Errors-To: $errorsto\r\n"); + if($replyto != "") + fputs($smtp, "Reply-To: $replyto\r\n"); + else + fputs($smtp, "Reply-To: $from\r\n"); + fputs($smtp, "From: $from\r\n"); + fputs($smtp, "To: $to\r\n"); + if(preg_match("/[^a-zA-Z0-9 .-\[\]!_@]/",$subject)) + { + fputs($smtp, "Subject: =?utf-8?B?".base64_encode(recode("html..utf-8", $subject))."?=\r\n"); + } + else + { + fputs($smtp, "Subject: $subject\r\n"); + } + fputs($smtp, "Mime-Version: 1.0\r\n"); + if($extra == "") + { + fputs($smtp, "Content-Type: text/plain; charset=\"utf-8\"\r\n"); + fputs($smtp, "Content-Transfer-Encoding: 8bit\r\n"); + } else { + fputs($smtp, "Content-Type: text/plain; charset=\"iso-8859-1\"\r\n"); + fputs($smtp, "Content-Transfer-Encoding: quoted-printable\r\n"); + fputs($smtp, "Content-Disposition: inline\r\n"); + } +// fputs($smtp, "Content-Transfer-Encoding: BASE64\r\n"); + fputs($smtp, "\r\n"); +// fputs($smtp, chunk_split(base64_encode(recode("html..utf-8", $message)))."\r\n.\r\n"); + fputs($smtp, recode("html..utf-8", $message)."\r\n.\r\n"); + fputs($smtp, "QUIT\n"); + $InputBuffer = fgets($smtp, 1024); + fclose($smtp); + } + +?> -- cgit v1.2.1