App-wsgetmail
view release on metacpan or search on metacpan
# NAME
App::wsgetmail - Fetch mail from the cloud using webservices
# SYNOPSIS
Run:
wsgetmail [options] --config=wsgetmail.json
where `wsgetmail.json` looks like:
{
"client_id": "abcd1234-xxxx-xxxx-xxxx-1234abcdef99",
"tenant_id": "abcd1234-xxxx-xxxx-xxxx-123abcde1234",
"secret": "abcde1fghij2klmno3pqrst4uvwxy5~0",
"global_access": 1,
"username": "rt-comment@example.com",
"folder": "Inbox",
"stripcr": 0,
"command": "/opt/rt5/bin/rt-mailgate",
"command_args": "--url=http://rt.example.com/ --queue=General --action=comment",
"command_timeout": 30,
"action_on_fetched": "mark_as_read"
}
Using App::wsgetmail as a library looks like:
my $getmail = App::wsgetmail->new({config => {
# The 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_message($message)
or warn "could not process $message->id";
}
This method is more like previous connections via IMAP. It is currently
supported by Microsoft, but not recommended. (See [Username/password](https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-authentication-flows#usernamepassword))
This section walks you through each piece of configuration wsgetmail needs,
and how to obtain it.
- tenant\_id
wsgetmail authenticates to an Azure Active Directory (AD) tenant. This
tenant is identified by an identifier that looks like a UUID/GUID: it should
be mostly alphanumeric, with dividing dashes in the same places as shown in
the example configuration above. Microsoft documents how to find your tenant
ID, and create a tenant if needed, in the ["Set up a tenant"
quickstart](https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-create-new-tenant). Save
this as the `tenant_id` string in your wsgetmail configuration file.
- client\_id
You need to register wsgetmail as an application in your Azure Active
Directory tenant. Microsoft documents how to do this in the ["Register an
bin/wsgetmail view on Meta::CPAN
=head1 NAME
wsgetmail - get mail from cloud webservices
=head1 SYNOPSIS
Run:
wsgetmail [options] --config=wsgetmail.json
where C<wsgetmail.json> looks like:
{
"client_id": "abcd1234-xxxx-xxxx-xxxx-1234abcdef99",
"tenant_id": "abcd1234-xxxx-xxxx-xxxx-123abcde1234",
"secret": "abcde1fghij2klmno3pqrst4uvwxy5~0",
"global_access": 1,
"username": "rt-comment@example.com",
"folder": "Inbox",
"command": "/opt/rt5/bin/rt-mailgate",
"command_args": "--url=http://rt.example.com/ --queue=General --action=comment",
inc/Module/Install.pm view on Meta::CPAN
my $who = $self->_caller;
my $cwd = Cwd::getcwd();
my $sym = "${who}::AUTOLOAD";
$sym->{$cwd} = sub {
my $pwd = Cwd::getcwd();
if ( my $code = $sym->{$pwd} ) {
# Delegate back to parent dirs
goto &$code unless $cwd eq $pwd;
}
unless ($$sym =~ s/([^:]+)$//) {
# XXX: it looks like we can't retrieve the missing function
# via $$sym (usually $main::AUTOLOAD) in this case.
# I'm still wondering if we should slurp Makefile.PL to
# get some context or not ...
my ($package, $file, $line) = caller;
die <<"EOT";
Unknown function is found at $file line $line.
Execution of $file aborted due to runtime errors.
If you're a contributor to a project, you may need to install
some Module::Install extensions from CPAN (or other repository).
lib/App/wsgetmail.pm view on Meta::CPAN
=head1 NAME
App::wsgetmail - Fetch mail from the cloud using webservices
=head1 SYNOPSIS
Run:
wsgetmail [options] --config=wsgetmail.json
where C<wsgetmail.json> looks like:
{
"client_id": "abcd1234-xxxx-xxxx-xxxx-1234abcdef99",
"tenant_id": "abcd1234-xxxx-xxxx-xxxx-123abcde1234",
"secret": "abcde1fghij2klmno3pqrst4uvwxy5~0",
"global_access": 1,
"username": "rt-comment@example.com",
"folder": "Inbox",
"stripcr": 0,
"command": "/opt/rt5/bin/rt-mailgate",
"command_args": "--url=http://rt.example.com/ --queue=General --action=comment",
"command_timeout": 30,
"action_on_fetched": "mark_as_read"
}
Using App::wsgetmail as a library looks like:
my $getmail = App::wsgetmail->new({config => {
# The 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_message($message)
or warn "could not process $message->id";
}
lib/App/wsgetmail.pm view on Meta::CPAN
=back
This section walks you through each piece of configuration wsgetmail needs,
and how to obtain it.
=over 4
=item tenant_id
wsgetmail authenticates to an Azure Active Directory (AD) tenant. This
tenant is identified by an identifier that looks like a UUID/GUID: it should
be mostly alphanumeric, with dividing dashes in the same places as shown in
the example configuration above. Microsoft documents how to find your tenant
ID, and create a tenant if needed, in the L<"Set up a tenant"
quickstart|https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-create-new-tenant>. Save
this as the C<tenant_id> string in your wsgetmail configuration file.
=item client_id
You need to register wsgetmail as an application in your Azure Active
Directory tenant. Microsoft documents how to do this in the L<"Register an
( run in 0.438 second using v1.01-cache-2.11-cpan-64827b87656 )