Skip to content

Commit ac57b13

Browse files
committed
fix: use dynamic domain in magic link email text
Extract host from magic link URL instead of hardcoding domain name.
1 parent 6151d78 commit ac57b13

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

app/services/email.server.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,12 @@ if (process.env.EMAIL_FROM) {
1111

1212
export const sendEmail: SendEmailFunction<User> = async (options) => {
1313
const subject = 'Link login untuk Kelas Rumah Berbagi'
14+
const siteHost = new URL(options.magicLink).host
1415
const body = renderToString(
1516
<main>
1617
Halo {options.user?.name || 'pengguna baru'},<br />
1718
<br />
18-
<a href={options.magicLink}>
19-
Klik di sini untuk masuk ke kelas.rumahberbagi.com
20-
</a>
19+
<a href={options.magicLink}>Klik di sini untuk masuk ke {siteHost}</a>
2120
<br />
2221
<p>
2322
Apabila bermasalah,{' '}

0 commit comments

Comments
 (0)