Hi,
I am trying to import some messages back into RC that have been exported
using the `Save (.eml)` function. These files always seem to be written with
\n line endings. This isn't a problem with Dovecot (on Debian), the messages
are imported and displayed just fine in RC. But with hMailServer (on
Windows) there is a problem. The messages are imported ok but RC cannot
display them. If before importing the message I change the line endings from
\n to \r\n then RC displays the message fine on both servers.
I can open the file before importing it and change the line endings but I am
wondering if I have missing something and there is a more elegant way of
doing it, does anyone have any suggestions?
At the moment I am using this code:
// check message has correct line endings
$message = file_get_contents($file);
$message = preg_replace('/\r?\n/', $rcmail->config->header_delimiter(),
$message);
file_put_contents($file, $message);
Thanks,
Phil
_______________________________________________
List info: http://lists.roundcube.net/dev/
BT/8f4f07cd