logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

Re: imap4...: msg#00010

Subject: Re: imap4...
* Tom Allison (tallison@xxxxxxxxxxx) [041221 06:06]:
> I've noticed that if I do a login using the $login value:
> 
> my $login = "imap4://$username:$password\@$server/";
> my $f = $mgr->open($login,
>                  authenticate => 'PLAIN',
>                  folder => 'bogofilter'
>                  );
> 
> my $folder = $mgr->open(type => 'imap4',
>                       server_name => $server,
>                       username => $username,
>                       password => $password,
>                       authenticate => 'PLAIN',
>                       folder => 'Inbox'
>                       );

open() can be used as $mgr->open('foldername', @options)
                   or $mgr->open(folder => 'foldername', @other_options);

In your first attempt, you have the folder option mentioned twice... so
one wins.  Correct use, as the docs explain is

  =option  folder NAME|URL
  =default folder C<$ENV{MAIL}>
                                                                                
  Which folder to open, specified by NAME or special URL.
  The URL format is composed as
  type://username:password@hostname:port/foldername

In your case

  my $login = "imap4://$username:$password\@$server/bogofilter";
  my $f = $mgr->open($login, authenticate => 'PLAIN');
-- 
               MarkOv

------------------------------------------------------------------------
drs Mark A.C.J. Overmeer                                MARKOV Solutions
       Mark@xxxxxxxxxxxx                          solutions@xxxxxxxxxxxx
http://Mark.Overmeer.net                   http://solutions.overmeer.net




<Prev in Thread] Current Thread [Next in Thread>