Re[4]: copyMessage

danny Zak <[email protected]> Wed, 1 Jun 2005 13:58:50 +0200
Newsgroups gmane.comp.lang.perl.modules.mail-box
Organization belGOnet.com
Message-ID <[email protected]>
Hallo Mark,

well i don't deal with decoding and encoding it again

i just use copyMessage .. (like in this simplified code)


my $mgr    = Mail::Box::Manager->new;
my $pop = $mgr->open(type => 'pop3',
            username => $user,
            password => $pass,
            server_name => $host);
my $rcvd  = $mgr->open(folder => "/var/spool/mail/$rembox",type => 'mbox',access=> 'rw');

foreach $msg ($pop->messages)
{
        $id = $msg->messageId;
        $mgr->copyMessage($rcvd,$msg);
}

just don't get it why it goes strange since the both pop and mbox are
both in linux


woensdag 1 juni 2005, 11:18:07, schreef u:

> * danny Zak ([email protected]) [050531 17:06]:
>> pop3 server = linux running qpopper
>> script = running on a other linux box
>> new destiation mbox folder = linux platform
>> 
>> client pop3 = windows platform
>> 
>> i tried to do a ->body of the mail that is received on popside and
>> display it to the console .. there are NO extra line feeds in this
>> message (visualy.. i should maybe convert it to utf to see if there is
>> \015\012 in it ?)

> Well, you should investigate this a little further.
> Officially, each line transmitted over Interner protocols (like POP, IMAP,
> SMTP) should end with CR and LF.  For local storage on Unix, you may want
> to get rit of the CR (^M) at the end of each line.
> If you process a message body, however, you always have to keep this
> (for Unix superfluous) CR in mind: for instance when the body has been
> encoded with base64 the CR can have survived.

> Try to print   $msg->body->decoded->print
> Working with the (forced) decoded version of the body is certainly better
> than working with the (possibly) encoded version. It should remove CRs.



-- 
Met vriendelijke groet,
danny                            mailto:[email protected]