using webservices
=head1 SYNOPSIS
Run:
wsgetmail [options] --config=wsgetmail.json
where C<wsgetmail.json> looks like:
{
"client_id": "abcd1234-xxxx-xxxx-xxxx-1234abcdef99",
"ten
config hashref takes all the same keys and values as the
# command line tool configuration JSON.
}});
while (my $message = $getmail->get_next_message()) {
$getmail->process_mess
nfiguration file, you can test it by running:
wsgetmail --debug --dry-run --config=wsgetmail.json
This will read and deliver messages, but will not mark them as read or
delete them. If there are
lient - Low-level client to the Microsoft Graph API
=cut
use Moo;
use URI::Escape;
use URI;
use JSON;
use LWP::UserAgent;
use Azure::AD::ClientCredentials;
=head1 DESCRIPTION
This class performs t
>content;
# check details
if ($response->is_success) {
my $token_details = decode_json( $response->content );
$access_token = "Bearer " . $token_details->{access_token};
}
l::MS365;
=head1 NAME
App::wsgetmail::MS365 - Fetch mail from Microsoft 365
=cut
use Moo;
use JSON;
use App::wsgetmail::MS365::Client;
use App::wsgetmail::MS365::Message;
use File::Temp;
=head1
{'Content-type'=> 'application/json',
Content => encode_json({isRead => $JSON::true }) });
unless ($response->is_success) {
r : " . $response->content if $self->debug;
return undef;
}
my $folders = decode_json( $response->content );
return $folders->{value}[0];
}
##############
sub _fetch_messages {