Email-Folder-Exchange
view release on metacpan or search on metacpan
lib/Email/Folder/Exchange/EWS.pm view on Meta::CPAN
# 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);
# EWS requires the path and method to be separated by slash, not pound
lib/Email/Folder/Exchange/WebDAV.pm view on Meta::CPAN
# guess path
if(! $uri->path || $uri->path =~ m{^/$}) {
my $path_user = $username;
$path_user =~ s/.*\\//;
$uri->path("/exchange/$path_user/Inbox");
}
# get credentials from url if specified
my $credentials = $uri->userinfo;
$uri->userinfo(undef);
if($credentials && !($username || $password)) {
($username, $password) = split(/:/, uri_unescape($credentials), 2);
}
croak "Credentials required" unless $username;
$self->_login($uri, $username, $password);
return $self;
} # }}}
sub _message_urls { # {{{
my ($self) = @_;
( run in 0.241 second using v1.01-cache-2.11-cpan-4d50c553e7e )