mirror of
https://github.com/appwrite/appwrite
synced 2026-05-24 09:28:40 +00:00
Merge pull request #739 from appwrite/feat-730-disable-smtp-server
Feat 730 disable smtp server
This commit is contained in:
commit
2a0b07ac26
3 changed files with 8 additions and 1 deletions
|
|
@ -40,6 +40,7 @@
|
||||||
- Upgraded Traefik image to version 2.3
|
- Upgraded Traefik image to version 2.3
|
||||||
- Upgraded Redis Docker image to version 6.0 (alpine)
|
- Upgraded Redis Docker image to version 6.0 (alpine)
|
||||||
- Upgraded Influxdb Docker image to version 1.8 (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!)
|
## Breaking Changes (Read before upgrading!)
|
||||||
- **Deprecated** `first` and `last` query params for documents list route in the database API
|
- **Deprecated** `first` and `last` query params for documents list route in the database API
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Utopia\App;
|
use Utopia\App;
|
||||||
|
use Utopia\CLI\Console;
|
||||||
|
|
||||||
require_once __DIR__.'/../init.php';
|
require_once __DIR__.'/../init.php';
|
||||||
|
|
||||||
|
|
@ -23,6 +24,11 @@ class MailsV1
|
||||||
{
|
{
|
||||||
global $register;
|
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'];
|
$event = $this->args['event'];
|
||||||
$from = $this->args['from'];
|
$from = $this->args['from'];
|
||||||
$recipient = $this->args['recipient'];
|
$recipient = $this->args['recipient'];
|
||||||
|
|
|
||||||
|
|
@ -112,7 +112,7 @@ If running in production, it might be easier to use a 3rd party SMTP server as i
|
||||||
|
|
||||||
### _APP_SMTP_HOST
|
### _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
|
### _APP_SMTP_PORT
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue