alpha
This commit is contained in:
@@ -51,6 +51,7 @@ class EmailService {
|
||||
"rentalCompletionCongratsToOwner.html",
|
||||
"payoutReceivedToOwner.html",
|
||||
"firstListingCelebrationToOwner.html",
|
||||
"alphaInvitationToUser.html",
|
||||
];
|
||||
|
||||
for (const templateFile of templateFiles) {
|
||||
@@ -594,6 +595,31 @@ class EmailService {
|
||||
);
|
||||
}
|
||||
|
||||
async sendAlphaInvitation(email, code) {
|
||||
// Ensure service is initialized before rendering template
|
||||
if (!this.initialized) {
|
||||
await this.initialize();
|
||||
}
|
||||
|
||||
const frontendUrl = process.env.FRONTEND_URL || "http://localhost:3000";
|
||||
|
||||
const variables = {
|
||||
code: code,
|
||||
email: email,
|
||||
frontendUrl: frontendUrl,
|
||||
title: "Welcome to Alpha Testing!",
|
||||
message: `You've been invited to join our exclusive alpha testing program. Use the code <strong>${code}</strong> to unlock access and be among the first to experience our platform.`,
|
||||
};
|
||||
|
||||
const htmlContent = this.renderTemplate("alphaInvitationToUser", variables);
|
||||
|
||||
return await this.sendEmail(
|
||||
email,
|
||||
"Your Alpha Access Code - RentAll",
|
||||
htmlContent
|
||||
);
|
||||
}
|
||||
|
||||
async sendPasswordResetEmail(user, resetToken) {
|
||||
const frontendUrl = process.env.FRONTEND_URL || "http://localhost:3000";
|
||||
const resetUrl = `${frontendUrl}/reset-password?token=${resetToken}`;
|
||||
|
||||
Reference in New Issue
Block a user