diff --git a/src/email/email.service.ts b/src/email/email.service.ts index a25574f..9f16ea2 100644 --- a/src/email/email.service.ts +++ b/src/email/email.service.ts @@ -71,12 +71,12 @@ export class EmailService { const frontendUrl = this.configService.get('FRONTEND_URL') || 'http://localhost:3000'; const verificationUrl = `${frontendUrl}/verify-email?token=${token}`; - const html = getVerificationEmailTemplate({ verificationUrl, name }); - const text = `Welcome to RE-QuestN! Please verify your email by clicking this link: ${verificationUrl}`; + const html = getVerificationEmailTemplate({ verificationUrl, name, frontendUrl }); + const text = `Welcome to RE-Quest! Please verify your email by clicking this link: ${verificationUrl}`; return this.sendEmail({ to: email, - subject: 'Verify Your Email - RE-QuestN', + subject: 'Verify Your Email - RE-Quest', html, text, }); @@ -86,12 +86,13 @@ export class EmailService { // PASSWORD RESET // ========================================== async sendPasswordResetEmail(email: string, resetUrl: string): Promise { - const html = getPasswordResetTemplate({ resetUrl }); + const frontendUrl = this.configService.get('FRONTEND_URL') || 'http://localhost:3000'; + const html = getPasswordResetTemplate({ resetUrl, frontendUrl }); const text = `Reset your password by clicking this link: ${resetUrl}. This link will expire in 1 hour.`; return this.sendEmail({ to: email, - subject: 'Reset Your Password - RE-QuestN', + subject: 'Reset Your Password - RE-Quest', html, text, }); @@ -103,11 +104,11 @@ export class EmailService { async sendWelcomeEmail(email: string, name?: string): Promise { const frontendUrl = this.configService.get('FRONTEND_URL') || 'http://localhost:3000'; const html = getWelcomeEmailTemplate({ name, frontendUrl }); - const text = `Welcome to RE-QuestN, ${name || 'User'}! Your real estate journey starts now.`; + const text = `Welcome to RE-Quest, ${name || 'User'}! Your real estate journey starts now.`; return this.sendEmail({ to: email, - subject: 'Welcome to RE-QuestN!', + subject: 'Welcome to RE-Quest!', html, text, }); diff --git a/src/email/templates/base.template.ts b/src/email/templates/base.template.ts index 6aedb13..81e8783 100644 --- a/src/email/templates/base.template.ts +++ b/src/email/templates/base.template.ts @@ -1,34 +1,20 @@ /** - * Base HTML email template with RE-QuestN branding + * Base HTML email template with RE-Quest branding * All email templates use this as their foundation * - * Using styled text logo for maximum email client compatibility + * Uses the actual RE-Quest logo image hosted on the frontend */ -function getLogo(): string { - // Styled text logo - works in ALL email clients (Gmail, Outlook, Apple Mail, etc.) - return ` - - - - - - - - - +export function getBaseTemplate(content: string, logoUrl?: string): string { + const logoSrc = logoUrl || 'https://prod.re-quest.com/assets/images/splash-logo.png'; - `; -} - -export function getBaseTemplate(content: string): string { return ` - RE-QuestN + RE-Quest