App::wsgetmail::MS365 - Fetch mail from Microsoft 365
my $ms365 = App::wsgetmail::MS365->new({ client_id => "client UUID", tenant_id => "tenant UUID", secret => "random secret token", global_access => 1, folder => "Inbox", post_fetch_action => "mark_message_as_read", debug => 0, })
Moo class providing methods to connect to and fetch mail from Microsoft 365 mailboxes using the Graph REST API.
You must provide client_id, tenant_id, post_fetch_action, and authentication details. If global_access is false (the default), you must provide username and user_password. If you set global_access to a true value, you must provide secret.
client_id
tenant_id
post_fetch_action
global_access
username
user_password
secret
A string with the UUID of the client application to use for authentication.
A string with the UUID of your Microsoft 365 tenant to use for authentication.
A string with a username email address. If global_access is false (the default), the client authenticates with this username. If global_access is true, the client accesses this user's mailboxes.
A string with the user password to use for authentication without global access.
A string with the name of the email folder to read. Default "Inbox".
A boolean. If false (the default), the client will authenticate using username and user_password. If true, the client will authenticate using its secret token.
A string with the client secret to use for global authentication. This should look like a long string of completely random characters, not a UUID or other recognizable format.
A string with the name of a method to call after reading a message. You probably want to pass either "mark_message_as_read" or "delete_message". In principle, you can pass the name of any method that accepts a message ID string argument.
A boolean. If true, the object will issue a warning with details about each request it issues.
Class constructor method, returns new App::wsgetmail::MS365 object
Object method, returns the next message as an App::wsgetmail::MS365::Message object if there is one.
Will lazily fetch messages until the list is exhausted.
Object method, takes message id and returns filename of fetched raw mime file for that message.
Object method, takes message id and deletes that message from the outlook365 mailbox
Object method, takes message id and marks that message as read in the outlook365 mailbox
Object method, returns hashref of details of the configured mailbox folder.
Best Practical Solutions, LLC <modules@bestpractical.com>
This software is Copyright (c) 2020 by Best Practical Solutions, LLC.
This is free software, licensed under:
The GNU General Public License, Version 2, June 1991
To install App::wsgetmail, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::wsgetmail
CPAN shell
perl -MCPAN -e shell install App::wsgetmail
For more information on module installation, please visit the detailed CPAN module installation guide.