Skip to content

Commit a627578

Browse files
fix: resolve relative image URLs to production domain in subscriber notification emails
1 parent bb9037d commit a627578

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/mail.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ export const notifySubscribersOfNewPost = async (title: string, slug: string, ex
8888
const subscribers = await prisma.subscriber.findMany();
8989
if (subscribers.length === 0) return;
9090

91-
const imageUrl = image ? (image.startsWith('http') ? image : `${domain}${image}`) : null;
91+
const productionDomain = "https://dattasable.com";
92+
const imageUrl = image ? (image.startsWith('http') ? image : `${productionDomain}${image}`) : null;
9293

9394
const emailPromises = subscribers.map(sub =>
9495
transporter.sendMail({

0 commit comments

Comments
 (0)