diff --git a/app/config/locale/templates/email-webhook-failed.tpl b/app/config/locale/templates/email-webhook-failed.tpl
index e374d16711..921af9ee29 100644
--- a/app/config/locale/templates/email-webhook-failed.tpl
+++ b/app/config/locale/templates/email-webhook-failed.tpl
@@ -14,7 +14,7 @@
\ 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'];
diff --git a/src/Appwrite/Platform/Workers/Webhooks.php b/src/Appwrite/Platform/Workers/Webhooks.php
index 0674ea3fad..ad7c587d53 100644
--- a/src/Appwrite/Platform/Workers/Webhooks.php
+++ b/src/Appwrite/Platform/Workers/Webhooks.php
@@ -204,7 +204,7 @@ class Webhooks extends Action
$template->setParam('{{project}}', $project->getAttribute('name'));
$template->setParam('{{url}}', $webhook->getAttribute('url'));
$template->setParam('{{error}}', $curlError ?? 'The server returned ' . $statusCode . ' status code');
- $template->setParam('{{redirect}}', "/console/project-$projectId/settings/webhooks/$webhookId");
+ $template->setParam('{{path}}', "/console/project-$projectId/settings/webhooks/$webhookId");
$template->setParam('{{attempts}}', $attempts);
$subject = 'Webhook deliveries have been paused';