1
0
Fork 0
mirror of synced 2024-05-20 20:52:36 +12:00

Added env vars to change system email sender name and address

This commit is contained in:
Eldad Fux 2020-02-08 01:19:13 +02:00
parent 4066c65383
commit 0192041a17
2 changed files with 15 additions and 2 deletions

View file

@ -123,8 +123,11 @@ $register->set('smtp', function () use ($request) {
$mail->Password = $password;
$mail->SMTPSecure = $request->getServer('_APP_SMTP_SECURE', '');
$mail->setFrom('team@appwrite.io', APP_NAME.' Team');
$mail->addReplyTo('team@appwrite.io', APP_NAME.' Team');
$from = $request->getServer('_APP_SYSTEM_EMAIL_NAME', APP_NAME.' Team');
$email = $request->getServer('_APP_SYSTEM_EMAIL_ADDRESS', 'team@appwrite.io');
$mail->setFrom($email, $from);
$mail->addReplyTo($email, $from);
$mail->isHTML(true);

View file

@ -117,3 +117,13 @@ SMTP server user name. Empty by default.
### _APP_SMTP_PASSWORD
SMTP server user password. Empty by default.
## System Settings
### _APP_SYSTEM_EMAIL_NAME
This is the sender name value that will appear on email messages sent to developers from the Appwrite console. The default value is: 'Appwrite Team'.
### _APP_SYSTEM_EMAIL_ADDRESS
This is the sender email address that will appear on email messages sent to developers from the Appwrite console. The default value is 'team@appwrite.io'. You should choose an email address that is allowed to be used from your SMTP server to avoid the server email ending in the users' SPAM folders.