mirror of
https://github.com/projectsend/projectsend.git
synced 2026-09-12 06:48:55 +00:00
933eaa2ba4
Adds "Microsoft 365 (OAuth)" to the Email settings provider dropdown. Selecting it swaps the SMTP form for an app registration (client id, secret, optional tenant) and a "Connect mailbox" flow: the admin signs into the mailbox the installation should send as, and outgoing email goes through Graph sendMail as that mailbox — no password, no app password, no SMTP AUTH, which Microsoft is winding down. Delegated flow on purpose: it needs no admin consent and works for work/school and personal accounts alike. Its one weakness — a grant can die silently behind a password reset or a Conditional Access change — is answered by a daily scheduled refresh that keeps the token alive and, on a dead grant, warns the settings admins once in-app and on the settings page instead of letting mail stop quietly. Tokens and the client secret live encrypted in their own row and are read fresh at send time, never through the boot-config cache. The stored SMTP transport survives a provider switch untouched.
22 lines
935 B
PHP
22 lines
935 B
PHP
<?php
|
|
|
|
use Illuminate\Foundation\Inspiring;
|
|
use Illuminate\Support\Facades\Artisan;
|
|
use Illuminate\Support\Facades\Schedule;
|
|
|
|
Artisan::command('inspire', function () {
|
|
$this->comment(Inspiring::quote());
|
|
})->purpose('Display an inspiring quote');
|
|
|
|
Schedule::command('projectsend:purge-erasures')->daily();
|
|
Schedule::command('projectsend:purge-stale-uploads')->daily();
|
|
Schedule::command('projectsend:purge-zip-downloads')->daily();
|
|
Schedule::command('projectsend:check-for-updates')->daily();
|
|
Schedule::command('projectsend:fetch-news')->daily();
|
|
Schedule::command('projectsend:purge-expired-files')->daily();
|
|
Schedule::command('projectsend:purge-orphan-files')->daily();
|
|
Schedule::command('projectsend:purge-api-request-logs')->daily();
|
|
Schedule::command('projectsend:purge-failed-jobs')->daily();
|
|
Schedule::command('projectsend:purge-notifications')->daily();
|
|
Schedule::command('projectsend:refresh-mail-oauth-tokens')->daily();
|