On Wed, 16 May 2001, TECKIES.COM Online Magazine wrote:

> hi,
>
> I am trying to use the Mail::POP3Client.pm module to access my mailbox
> When I run the script I get an error "cannot close..." which is generated by
> the last line, If I comments this line, I get nothing on the command line,
> the scripts runs without any output, what's wrong
>
> 
>----------------------------------------------------------------------------------------------------------------
>
>
> #!/usr/bin/perl
>
> use Mail::POP3Client;
>
> $pop = new Mail::POP3Client( USER=> "username", PASSWORD=> "somepassword", HOST=> 
>"myhost.com" );
>
>   for ($i = 1; $i <= $pop->Count(); $i++)
>    {
>        foreach ( $pop->Head( $i ) ) {
>              /^(From|Subject):\s+/i and print $_, "\n";
>                  }
>                      print $pop->Head($i);
>                      print "\n";
>                        }
>
>   $pop->Close() or die "cannot close $!";
>
> __________________________________
>

I thought that to use POP3Client that one:

$pop = new Mail::POP3Client(HOST=>'myhost.com, AUTH_MODE=>'PASS');
$pop->User("username");
$pop->Pass("somepassword");
$pop->Connect || die "can\'t connect to myhost.com at ";

I understand that in the call to the Mail::POP3Client::new method that
if the USER and PASSWORD parameters are provided that it will invoke
the connect method for you but I believe that the default for AUTH_MODE
is 'APOP'. Perhaps all you need to do is provide the AUTHMODE=>'PASS'
parameter in your call to Mail::POP3Client.

**** [EMAIL PROTECTED] <Carl Jolley>
**** All opinions are my own and not necessarily those of my employer ****

_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users

Reply via email to