diff --git a/app/config/locale/templates/email-webhook-failed.tpl b/app/config/locale/templates/email-webhook-failed.tpl index e374d16711..b76f323572 100644 --- a/app/config/locale/templates/email-webhook-failed.tpl +++ b/app/config/locale/templates/email-webhook-failed.tpl @@ -14,7 +14,7 @@
- Webhook settings + Webhook settings
\ No newline at end of file diff --git a/src/Appwrite/Platform/Workers/Mails.php b/src/Appwrite/Platform/Workers/Mails.php index b4b792f0f1..2dfe1e7031 100644 --- a/src/Appwrite/Platform/Workers/Mails.php +++ b/src/Appwrite/Platform/Workers/Mails.php @@ -57,11 +57,13 @@ class Mails extends Action $log->addTag('type', empty($smtp) ? 'cloud' : 'smtp'); + $protocol = App::getEnv('_APP_OPTIONS_FORCE_HTTPS') == 'disabled' ? 'http' : 'https'; + $hostname = App::getEnv('_APP_DOMAIN'); + $recipient = $payload['recipient']; $subject = $payload['subject']; $variables = $payload['variables']; - $variables['protocol'] = App::getEnv('_APP_OPTIONS_FORCE_HTTPS') == 'disabled' ? 'http' : 'https'; - $variables['hostname'] = App::getEnv('_APP_DOMAIN'); + $variables['host'] = $protocol . '://' . $hostname; $name = $payload['name']; $body = $payload['body'];