home *** CD-ROM | disk | FTP | other *** search
/ Netrunner 2004 October / NETRUNNER0410.ISO / regular / ActivePerl-5.8.4.810-MSWin32-x86.msi / _3538b9ac444d9da09a7c964589de161a < prev    next >
Encoding:
Text File  |  2004-06-01  |  2.2 KB  |  74 lines

  1. # ======================================================================
  2. #
  3. # Copyright (C) 2000-2001 Paul Kulchenko (paulclinger@yahoo.com)
  4. # SOAP::Lite is free software; you can redistribute it
  5. # and/or modify it under the same terms as Perl itself.
  6. #
  7. # $Id: POP3.pm,v 1.3 2001/08/11 19:09:58 paulk Exp $
  8. #
  9. # ======================================================================
  10.  
  11. package XMLRPC::Transport::POP3;
  12.  
  13. use strict;
  14. use vars qw($VERSION);
  15. $VERSION = sprintf("%d.%s", map {s/_//g; $_} q$Name: release-0_55-public $ =~ /-(\d+)_([\d_]+)/);
  16.  
  17. use XMLRPC::Lite;
  18. use SOAP::Transport::POP3;
  19.  
  20. # ======================================================================
  21.  
  22. package XMLRPC::Transport::POP3::Server;
  23.  
  24. @XMLRPC::Transport::POP3::Server::ISA = qw(SOAP::Transport::POP3::Server);
  25.  
  26. sub initialize; *initialize = \&XMLRPC::Server::initialize;
  27.  
  28. # ======================================================================
  29.  
  30. 1;
  31.  
  32. __END__
  33.  
  34. =head1 NAME
  35.  
  36. XMLRPC::Transport::POP3 - Server side POP3 support for XMLRPC::Lite
  37.  
  38. =head1 SYNOPSIS
  39.  
  40.   use XMLRPC::Transport::POP3;
  41.  
  42.   my $server = XMLRPC::Transport::POP3::Server
  43.     -> new('pop://pop.mail.server')
  44.     # if you want to have all in one place
  45.     # -> new('pop://user:password@pop.mail.server') 
  46.     # or, if you have server that supports MD5 protected passwords
  47.     # -> new('pop://user:password;AUTH=+APOP@pop.mail.server') 
  48.     # specify path to My/Examples.pm here
  49.     -> dispatch_to('/Your/Path/To/Deployed/Modules', 'Module::Name', 'Module::method') 
  50.   ;
  51.   # you don't need to use next line if you specified your password in new()
  52.   $server->login('user' => 'password') or die "Can't authenticate to POP3 server\n";
  53.  
  54.   # handle will return number of processed mails
  55.   # you can organize loop if you want
  56.   do { $server->handle } while sleep 10;
  57.  
  58.   # you may also call $server->quit explicitly to purge deleted messages
  59.  
  60. =head1 DESCRIPTION
  61.  
  62. =head1 COPYRIGHT
  63.  
  64. Copyright (C) 2000-2001 Paul Kulchenko. All rights reserved.
  65.  
  66. This library is free software; you can redistribute it and/or modify
  67. it under the same terms as Perl itself.
  68.  
  69. =head1 AUTHOR
  70.  
  71. Paul Kulchenko (paulclinger@yahoo.com)
  72.  
  73. =cut
  74.