From 7d9bae3106d2e941e75930ab4e70b9f4117aed0d Mon Sep 17 00:00:00 2001 From: uckelman Date: Thu, 15 Jul 2010 10:37:53 +0000 Subject: Move creation of Message-ID to be before its first use! git-svn-id: https://vassalengine.svn.sourceforge.net/svnroot/vassalengine/site-src/trunk@6987 67b53d14-2c14-4ace-a08f-0dab2b34000c --- src/forum_post_send.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/forum_post_send.php') diff --git a/src/forum_post_send.php b/src/forum_post_send.php index e7c573b..aa86422 100644 --- a/src/forum_post_send.php +++ b/src/forum_post_send.php @@ -15,10 +15,12 @@ catch (Exception $e) { function send_post_to_lists($config, $user, $mode, $data, $post_data) { +/* print '

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

'; +*/ # Sanity check if (!in_array($mode, array('post', 'reply', 'quote', 'edit'))) { @@ -86,13 +88,17 @@ function send_post_to_lists($config, $user, $mode, $data, $post_data) { $forumURL = 'http://' . $_SERVER['SERVER_NAME'] . dirname($_SERVER['SCRIPT_NAME']); + $editId = $bridge->reserveEditId($postId); + $messageId = build_message_id($postId, $editId, + $time, $_SERVER['SERVER_NAME']); + # Assemble the message headers $headers = array( 'To' => $to, 'From' => $from, 'Subject' => $subject, 'Date' => $date, - 'Message-Id' => $messageId, + 'Message-ID' => $messageId, 'X-BeenThere' => $forumURL ); @@ -185,10 +191,6 @@ EOF; $body = $msg['body']; } - $editId = $bridge->reserveEditId($postId); - $messageId = build_message_id($postId, $editId, - $time, $_SERVER['SERVER_NAME']); - $mailer = Mail::factory('sendmail'); # Register the message -- cgit v1.2.3