emails (#
1795310).
- Fix typo in SpamCop plugin.
- Tidy some output (slightly personal to stop Eclipse complaining about errors in the code)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@13942
7612ce4b-ef26-0410-bec9-
ea0150e637f0
- Added the ability to configure Google Mail (Gmail) as the mail server
behind SquirrelMail.
- Explicitly disable caching for left_main and right_main pages (#2983134).
+ - Fix error with SpamCop reporting plugin not being able to send report as
+ emails (#1795310).
+ - Fix typo in SpamCop plugin.
Version 1.5.1 (branched on 2006-02-12)
--------------------------------------
*/
function spamcop_getMessage_RFC822_Attachment($message, $composeMessage, $passed_id,
$passed_ent_id='', $imapConnection) {
+
+ global $username, $attachment_dir;
if (!$passed_ent_id) {
$body_a = sqimap_run_command($imapConnection,
$body = implode('', $body_a) . "\r\n";
$filename = sq_get_attach_tempfile();
- $fp = fopen($filename, 'wb');
+ $hashed_attachment_dir = getHashedDir($username, $attachment_dir);
+
+ $fp = fopen("$hashed_attachment_dir/$filename", 'wb');
fwrite ($fp, $body);
fclose($fp);
$composeMessage->initAttachment('message/rfc822','email.txt',
$filename);
}
+
return $composeMessage;
}
echo ">"._("Quick email-based reporting");
echo '</option>';
}
- ?>
- <option value="thorough_email"
- <?php
- if ($spamcop_method == 'thorough_email') echo ' selected="selected"';
- echo ">"._("Thorough email-based reporting");
- ?>
- </option>
- <option value="web_form"
- <?php
- if ($spamcop_method == 'web_form') echo ' selected="selected"';
- echo ">"._("Web-based form");
- ?>
- </option>
+ $selected = '';
+ if ($spamcop_method == 'thorough_email') {
+ $selected = ' selected';
+ }
+ echo sprintf(' <option value="thorough_email"%s>%s</option>',$selected, _("Through email-based reporting"));
+
+ $selected = '';
+ if ($spamcop_method == 'web_form') {
+ $selected = ' selected';
+ }
+ echo sprintf(' <option value="web_form"%s>%s</option>', $selected, _("Web-based form"));
+
+ ?>
</select>
<input type="hidden" name="action" value="meth" />
<?php
msgid "Quick email-based reporting"
msgstr ""
-msgid "Thorough email-based reporting"
+msgid "Through email-based reporting"
msgstr ""
msgid "Web-based form"
$_FILES['attachfile']['tmp_name'] != 'none') {
$AttachFailure = saveAttachedFiles($session);
}
+
if (checkInput(false) && !isset($AttachFailure)) {
if ($mailbox == "All Folders") {
/* We entered compose via the search results page */