diff --git a/app/config/locale/translations/en.json b/app/config/locale/translations/en.json
index 60a6bacd24..3c355ffcac 100644
--- a/app/config/locale/translations/en.json
+++ b/app/config/locale/translations/en.json
@@ -11,7 +11,7 @@
"emails.verification.signature": "{{project}} team",
"emails.magicSession.subject": "{{project}} Login",
"emails.magicSession.hello": "Hello,",
- "emails.magicSession.optionButton": "Click the button below to securely sign in to your {{project}} account. It will expire in 1 hour.",
+ "emails.magicSession.optionButton": "Click the button below to securely sign in to your {{projectBold}} account. It will expire in 1 hour.",
"emails.magicSession.buttonText": "Sign in to {{project}}",
"emails.magicSession.optionUrl": "If the button above doesn't show, use the following link:",
"emails.magicSession.clientInfo": "This sign in was requested using {{agentClient}} on {{agentDevice}} {{agentOs}}. If you didn't request the sign in, you can safely ignore this email.",
diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php
index 8364063f1a..1784bafc1c 100644
--- a/app/controllers/api/account.php
+++ b/app/controllers/api/account.php
@@ -1035,7 +1035,6 @@ App::post('/v1/account/sessions/magic-url')
$url['query'] = Template::mergeQuery(((isset($url['query'])) ? $url['query'] : ''), ['userId' => $user->getId(), 'secret' => $loginSecret, 'expire' => $expire, 'project' => $project->getId()]);
$url = Template::unParseURL($url);
- $body = $locale->getText("emails.magicSession.body");
$subject = $locale->getText("emails.magicSession.subject");
$customTemplate = $project->getAttribute('templates', [])['email.magicSession-' . $locale->default] ?? [];
@@ -1046,7 +1045,6 @@ App::post('/v1/account/sessions/magic-url')
$message = Template::fromFile(__DIR__ . '/../../config/locale/templates/email-magic-url.tpl');
$message
- ->setParam('{{body}}', $body)
->setParam('{{hello}}', $locale->getText("emails.magicSession.hello"))
->setParam('{{optionButton}}', $locale->getText("emails.magicSession.optionButton"))
->setParam('{{buttonText}}', $locale->getText("emails.magicSession.buttonText"))
@@ -1108,10 +1106,11 @@ App::post('/v1/account/sessions/magic-url')
'user' => '',
'team' => '',
'project' => $project->getAttribute('name'),
+ 'projectBold' => '' . $project->getAttribute('name') . '',
'redirect' => $url,
- 'agentDevice' => $agentDevice['deviceBrand'] ?? $agentDevice['deviceBrand'] ?? 'UNKNOWN',
- 'agentClient' => $agentClient['clientName'] ?? 'UNKNOWN',
- 'agentOs' => $agentOs['osName'] ?? 'UNKNOWN'
+ 'agentDevice' => '' . ( $agentDevice['deviceBrand'] ?? $agentDevice['deviceBrand'] ?? 'UNKNOWN') . '',
+ 'agentClient' => '' . ($agentClient['clientName'] ?? 'UNKNOWN') . '',
+ 'agentOs' => '' . ($agentOs['osName'] ?? 'UNKNOWN') . ''
];
$queueForMails