diff --git a/app/init.php b/app/init.php index aff5f795e..d9289d0a4 100644 --- a/app/init.php +++ b/app/init.php @@ -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); diff --git a/docs/tutorials/environment-variables.md b/docs/tutorials/environment-variables.md index 842601a61..ffa9300be 100644 --- a/docs/tutorials/environment-variables.md +++ b/docs/tutorials/environment-variables.md @@ -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. \ No newline at end of file