Skip mail when no SMTP hostname set
This commit is contained in:
parent
63e442293c
commit
ffdfc36229
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
|
||||
use Utopia\App;
|
||||
use Utopia\CLI\Console;
|
||||
|
||||
require_once __DIR__.'/../init.php';
|
||||
|
||||
|
@ -23,6 +24,11 @@ class MailsV1
|
|||
{
|
||||
global $register;
|
||||
|
||||
if(empty(App::getEnv('_APP_SMTP_HOST'))) {
|
||||
Console::info('Skipped mail. No SMTP server hostname has been set.');
|
||||
return;
|
||||
}
|
||||
|
||||
$event = $this->args['event'];
|
||||
$from = $this->args['from'];
|
||||
$recipient = $this->args['recipient'];
|
||||
|
|
Loading…
Reference in a new issue