Enhance email notifications for host application approvals and rejections by including the host's first name in the greeting.
This commit is contained in:
@@ -47,7 +47,7 @@ export const handler = safeHandler(async (
|
||||
// Add suggestion using service
|
||||
await minglarService.acceptHostApplication(hostXid, userInfo.id);
|
||||
const hostDetails = await minglarService.getUserDetails(hostXid)
|
||||
await sendEmailToHostForApprovedApplication(hostDetails.emailAddress)
|
||||
await sendEmailToHostForApprovedApplication(hostDetails.emailAddress, hostDetails.firstName)
|
||||
|
||||
return {
|
||||
statusCode: 200,
|
||||
|
||||
@@ -47,7 +47,7 @@ export const handler = safeHandler(async (
|
||||
// Add suggestion using service
|
||||
await minglarService.rejectHostApplicationAM(hostXid, userInfo.id);
|
||||
const hostDetails = await minglarService.getUserDetails(hostXid)
|
||||
await sendAMRejectionMailtoHost(hostDetails.emailAddress)
|
||||
await sendAMRejectionMailtoHost(hostDetails.emailAddress, hostDetails.firstName)
|
||||
|
||||
return {
|
||||
statusCode: 200,
|
||||
|
||||
@@ -4,6 +4,7 @@ import config from "../../../config/config";
|
||||
|
||||
export async function sendEmailToHostForApprovedApplication(
|
||||
emailAddress: string,
|
||||
name: string
|
||||
): Promise<{
|
||||
sent: boolean;
|
||||
// messageId: string
|
||||
@@ -12,7 +13,7 @@ export async function sendEmailToHostForApprovedApplication(
|
||||
const subject = "Approval for your application";
|
||||
|
||||
const htmlContent = `
|
||||
<p>Dear Host,</p>
|
||||
<p>Dear ${name},</p>
|
||||
<p>Congratulations, Your application to minglar admin has been approved.</p>
|
||||
<p>You can start onboarding your activities through the host panel.</p>
|
||||
<p> You can login to your account using the link below:<br/>
|
||||
|
||||
@@ -39,6 +39,7 @@ export async function sendEmailToHostForRejectedApplication(
|
||||
|
||||
export async function sendAMRejectionMailtoHost(
|
||||
emailAddress: string,
|
||||
name: string
|
||||
): Promise<{
|
||||
sent: boolean;
|
||||
// messageId: string
|
||||
@@ -47,7 +48,7 @@ export async function sendAMRejectionMailtoHost(
|
||||
const subject = "Improvement of your application";
|
||||
|
||||
const htmlContent = `
|
||||
<p>Dear Host,</p>
|
||||
<p>Dear ${name},</p>
|
||||
<p> Your account manager has reviewed your application and provided some suggestions. <br/>
|
||||
Please make the necessary improvements and re-submit your application to proceed with the onboarding process on Minglar.</p>
|
||||
<p> You may access your application using the link below:<br/>
|
||||
|
||||
Reference in New Issue
Block a user