On Wed, 08 Sep 2010 09:55:58 +0200, "A.L.E.C" <[email protected]> wrote:
> On 08.09.2010 09:37, Phil Weir wrote:
> 
>> 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?
> 
> You need to make replacement before using rcube_imap_generic's
> appendFromFile(). You could use append() instead, but not for really big
> messages.
> 
>> 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);
> 
> Don't use header_delimiter() method. It should be used only for sending
> mail with mail() function. For SMTP/IMAP standard (\r\n) delimiter
> should be used always.

That works great Alec, thanks very much for your help.

Phil
_______________________________________________
List info: http://lists.roundcube.net/dev/
BT/8f4f07cd

Reply via email to