projects
/
squirrelmail.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sec. try
[squirrelmail.git]
/
functions
/
smtp.php
diff --git
a/functions/smtp.php
b/functions/smtp.php
index f04200a874d9a27534a35b3c97e289e44b3e5015..5c9f7f0ef875b687e48fe6e8f75c2a5e9468b036 100644
(file)
--- a/
functions/smtp.php
+++ b/
functions/smtp.php
@@
-189,7
+189,7
@@
function attachFiles ($fp, $session, $rn="\r\n") {
/* Delete files that are uploaded for attaching
*/
function deleteAttachments($session) {
/* Delete files that are uploaded for attaching
*/
function deleteAttachments($session) {
- global $username, $attachments, $attachment_dir;
+ global $username, $attachments, $attachment_dir
, $data_dir
;
$hashed_attachment_dir = getHashedDir($username, $attachment_dir);
$rem_attachments = array();
$hashed_attachment_dir = getHashedDir($username, $attachment_dir);
$rem_attachments = array();
@@
-204,6
+204,7
@@
function deleteAttachments($session) {
}
}
$attachments = $rem_attachments;
}
}
$attachments = $rem_attachments;
+ setPref($data_dir, $username, 'attachments', serialize($attachments));
}
/* Return a nice MIME-boundary
}
/* Return a nice MIME-boundary
@@
-748,14
+749,23
@@
function calculate_references($refs, $inreplyto, $old_reply_to) {
$refer = "";
for ($i=1;$i<count($refs[0]);$i++) {
if (!empty($refs[0][$i])) {
$refer = "";
for ($i=1;$i<count($refs[0]);$i++) {
if (!empty($refs[0][$i])) {
- if (preg_match("/^References:(.+)$/", $refs[0][$i], $regs)) {
+ if (preg_match("/^References:(.+)$/
UA
", $refs[0][$i], $regs)) {
$refer = trim($regs[1]);
}
$refer = trim($regs[1]);
}
- else {
- $refer .= ' ' . trim($refs[0][$i]);
- }
+ else {
+ $refer .= ' ' . trim($refs[0][$i]);
+ }
+
}
}
}
}
+ $refer_a = explode(' ', $refer);
+ $refer = '';
+ foreach ($refer_a as $ref) {
+ $ref = trim($ref);
+ if ($ref{0} == '<' && $ref{(strlen($ref)-1)} == '>') {
+ $refer .= $ref . ' ';
+ }
+ }
$refer = trim($refer);
if (strlen($refer) > 2) {
$refer .= ' ' . $inreplyto;
$refer = trim($refer);
if (strlen($refer) > 2) {
$refer .= ' ' . $inreplyto;
@@
-788,7
+798,7
@@
function sendMessage($t, $c, $b, $subject, $body, $reply_id, $MDN,
if (isset($reply_id) && $reply_id) {
sqimap_mailbox_select ($imap_stream, $mailbox);
if (isset($reply_id) && $reply_id) {
sqimap_mailbox_select ($imap_stream, $mailbox);
- sqimap_messages_flag ($imap_stream, $reply_id, $reply_id, 'Answered');
+ sqimap_messages_flag ($imap_stream, $reply_id, $reply_id, 'Answered'
, false
);
/* Insert In-Reply-To and References headers if the
* message-id of the message we reply to is set (longer than "<>")
/* Insert In-Reply-To and References headers if the
* message-id of the message we reply to is set (longer than "<>")