From 430be822051ff6c319d67cbd205fbca2d8c2b925 Mon Sep 17 00:00:00 2001 From: kink Date: Wed, 8 May 2002 14:03:07 +0000 Subject: [PATCH] Fix bug #550605, thanks to Cor Bosman. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2805 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- ChangeLog | 1 + plugins/spamcop/spamcop.php | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/ChangeLog b/ChangeLog index 465e7c61..007a82ad 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,7 @@ Version 1.2.7 -- CVS -------------------- + - Fix SpamCop plugin. - Fixed send MDN link. - Fixed dealing with \r\n and \n in smtp.php. - Fixed to, cc, bcc arrays in message->header diff --git a/plugins/spamcop/spamcop.php b/plugins/spamcop/spamcop.php index 1822da77..eea99e9b 100644 --- a/plugins/spamcop/spamcop.php +++ b/plugins/spamcop/spamcop.php @@ -16,6 +16,15 @@ if ($spamcop_method == 'quick_email' || $spamcop_method == 'thorough_email') { // Use email-based reporting -- save as an attachment + if(!isset($composesession)) { + $composesession = 0; + session_register('composesession'); + } + if (!isset($session)) { + $session = "$composesession" +1; + $composesession = $session; + } + if (!isset($attachments)) { $attachments = array(); session_register('attachments'); @@ -33,6 +42,7 @@ $newAttachment['localfilename'] = $file; $newAttachment['remotefilename'] = 'email.txt'; $newAttachment['type'] = 'message/rfc822'; + $newAttachment['session'] = $session; $fp = fopen($attachment_dir . $file, 'w'); foreach ($read as $line) { fputs($fp, $line); @@ -90,6 +100,7 @@ agree to follow SpamCop's rules/terms of service/etc.

+