From 66ed9441658a9a5100ec78b82af19c6127a56575 Mon Sep 17 00:00:00 2001 From: uckelman Date: Tue, 20 Apr 2010 19:21:03 +0000 Subject: * Don't sent HTML email. * Append footer with backlink to post. git-svn-id: https://vassalengine.svn.sourceforge.net/svnroot/vassalengine/site-src/trunk@6720 67b53d14-2c14-4ace-a08f-0dab2b34000c --- src/F2M.php | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/F2M.php b/src/F2M.php index d06a2ec..a3f30a5 100644 --- a/src/F2M.php +++ b/src/F2M.php @@ -7,23 +7,17 @@ catch (Exception $e) { trigger_error($e, E_USER_ERROR); } -# TODO: wrap long lines # TODO: handle attachments function send_to_lists($user, $mode, $data, $post_data) { -/* print '

'; var_dump($data); var_dump($post_data); print '

'; -*/ - - set_include_path(get_include_path() . PATH_SEPARATOR . __DIR__ . '/..'); - require_once('HTML/BBCodeParser.php'); require_once('Mail.php'); - require_once('Mail/mime.php'); +# require_once('Mail/mime.php'); require_once(__DIR__ . '/Bridge.php'); require_once(__DIR__ . '/PhpBB3.php'); @@ -83,9 +77,9 @@ function send_to_lists($user, $mode, $data, $post_data) { 'Date' => $date, 'Message-Id' => $messageId, 'X-BeenThere' => $forumURL, -# 'Content-Type' => 'text/plain; charset=UTF-8; format=flowed', -# 'MIME-Version' => '1.0', -# 'Conten-Transfer-Encoding' => '8bit' + 'Content-Type' => 'text/plain; charset=UTF-8; format=flowed', + 'MIME-Version' => '1.0', + 'Conten-Transfer-Encoding' => '8bit' ); if ($inReplyTo !== null) { @@ -100,8 +94,22 @@ function send_to_lists($user, $mode, $data, $post_data) { $text = $data['message']; strip_bbcode($text, $data['bbcode_uid']); $text = htmlspecialchars_decode($text); - $text = wordwrap($text); + $text = wordwrap($text, 72); + + # Add the bridge footer + $postURL = "$forumURL/viewtopic.php?p=$postId#p$postId"; + + $footer = <<headers($headers); +*/ $mailer = Mail::factory('sendmail'); -- cgit v1.2.3