diff options
author | Thomas Bruederli <thomas@roundcube.net> | 2014-03-25 19:28:43 +0100 |
---|---|---|
committer | Thomas Bruederli <thomas@roundcube.net> | 2014-03-25 19:28:43 +0100 |
commit | a8a50de4e3a3f83180c32815a965732fd8171088 (patch) | |
tree | a6a54b17bb2ca031cc5efb5d324b9887d7972dbc /program/steps/mail | |
parent | e435d3b1205c3e1a8f925fc131ed6d18820e2143 (diff) |
Improve mbox format import: don't expect empty lines after each message
Diffstat (limited to 'program/steps/mail')
-rw-r--r-- | program/steps/mail/import.inc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/program/steps/mail/import.inc b/program/steps/mail/import.inc index 5a74feb9f..217927537 100644 --- a/program/steps/mail/import.inc +++ b/program/steps/mail/import.inc @@ -52,7 +52,7 @@ if (is_array($_FILES['_file'])) { fseek($fp, 0); while (($line = fgets($fp)) !== false) { // importing mbox file, split by From - lines - if (preg_match('/^From\s+-/', $line) && $lastline == '') { + if (preg_match('/^From\s+-/', $line) && ($lastline == '' || substr($lastline, -2) == '--')) { if (!empty($message)) { if ($RCMAIL->storage->save_message(null, rtrim($message))) { $imported++; |