Email-Folder-Exchange
view release on metacpan or search on metacpan
lib/Email/Folder/Exchange/EWS.pm view on Meta::CPAN
my $uri = URI->new($url);
# guess the path to the exchange web service
if(! $uri->path) {
$uri->path('/EWS/Exchange.asmx');
}
# build soap accessor
my $soap = SOAP::Lite->proxy(
$uri->as_string,
keep_alive => 1,
credentials => [
$uri->host . ':' . ( $uri->scheme eq 'https' ? '443' : '80' ),
# $uri->host,
'',
$username,
$password
],
requests_redirectable => [ 'GET', 'POST', 'HEAD' ],
);
$self->soap($soap);
lib/Email/Folder/Exchange/WebDAV.pm view on Meta::CPAN
return 1;
} # }}}
sub new { # {{{
my ($self, $class, $url, $username, $password) = ({}, @_);
bless $self, $class;
croak "URI required" unless $url;
# create user agent
my $ua = LWP::UserAgent->new( keep_alive => 1, cookie_jar => {} );
$self->_ua($ua);
# create uri object
my $uri = URI->new($url);
$self->uri($uri);
# guess path
if(! $uri->path || $uri->path =~ m{^/$}) {
my $path_user = $username;
$path_user =~ s/.*\\//;
( run in 1.104 second using v1.01-cache-2.11-cpan-39bf76dae61 )