Merge pull request #739 from appwrite/feat-730-disable-smtp-server

Feat 730 disable smtp server
This commit is contained in:
Eldad A. Fux 2020-11-22 18:24:04 +02:00 committed by GitHub
commit 2a0b07ac26
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 1 deletions

View file

@ -40,6 +40,7 @@
- Upgraded Traefik image to version 2.3
- Upgraded Redis Docker image to version 6.0 (alpine)
- Upgraded Influxdb Docker image to version 1.8 (alpine)
- Added option to disable mail sending by setting empty SMTP host
## Breaking Changes (Read before upgrading!)
- **Deprecated** `first` and `last` query params for documents list route in the database API

View file

@ -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 processing. No SMTP server hostname has been set.');
return;
}
$event = $this->args['event'];
$from = $this->args['from'];
$recipient = $this->args['recipient'];

View file

@ -112,7 +112,7 @@ If running in production, it might be easier to use a 3rd party SMTP server as i
### _APP_SMTP_HOST
SMTP server host name address. Default value is: 'smtp'
SMTP server host name address. Default value is: 'smtp'. Pass an empty string to disable all mail sending from the server.
### _APP_SMTP_PORT