diff --git a/packages/api/src/router/exports.ts b/packages/api/src/router/exports.ts index 28b2372c7..8d1c53de4 100644 --- a/packages/api/src/router/exports.ts +++ b/packages/api/src/router/exports.ts @@ -724,23 +724,23 @@ export const exportsRouter = router({ to: userEmail, name: "Oak National Academy", subject: "Download your lesson made with Aila: " + lessonTitle, - body: ` -Hi ${userFirstName}, - -These are the lesson resources that you created with Aila. -You can use the following links to copy the lesson resources to your Google Drive. - -Lesson plan: ${`${lessonPlanLink.split("/edit")[0]}/copy`} -Slides: ${`${slidesLink.split("/edit")[0]}/copy`} -Worksheet: ${`${worksheetLink.split("/edit")[0]}/copy`} -Starter quiz: ${`${starterQuizLink.split("/edit")[0]}/copy`} -Exit quiz: ${`${exitQuizLink.split("/edit")[0]}/copy`} -Additional materials: ${`${additionalMaterialsLink.split("/edit")[0]}/copy`} - -We hope the lesson goes well for you and your class. If you have any feedback for us, please let us know. You can simply reply to this email. - -Aila, -Oak National Academy`, + htmlBody: `
Hi ${userFirstName},
+ +These are the lesson resources that you created with Aila.
+ You can use the following links to copy the lesson resources to your Google Drive.
We hope the lesson goes well for you and your class. If you have any feedback for us, please let us know. You can simply reply to this email.
+ +Aila
+ Oak National Academy
Hi ${userFirstName},
+ +We made the lesson: ${lessonTitle}
+ +You can use the following link to copy the lesson resources ${title.toLowerCase()} to your Google Drive: + ${`${link.split("/edit")[0]}/copy`} +
+ +We hope the lesson goes well for you and your class. If you have any feedback for us, please let us know. You can simply reply to this email.
+ +Best regards,
+ Aila,
+ Oak National Academy
${body}`, + TextBody: stripHtml(htmlBody), + HtmlBody: `${htmlBody}`, MessageStream: "outbound", }); diff --git a/packages/core/src/utils/sendEmailRequestingMoreGenerations.ts b/packages/core/src/utils/sendEmailRequestingMoreGenerations.ts index 03a3ada3d..25325dc67 100644 --- a/packages/core/src/utils/sendEmailRequestingMoreGenerations.ts +++ b/packages/core/src/utils/sendEmailRequestingMoreGenerations.ts @@ -12,13 +12,13 @@ export const sendEmailRequestingMoreGenerations = async (input: { userEmail: string; }) => { const emailContent = ` - User ${input.userEmail} has requested more generations for app ${input.appSlug}. +
User ${input.userEmail} has requested more generations for app ${input.appSlug}.
`; return sendEmail({ from: "ai.feedback@thenational.academy", to: NEXT_PUBLIC_GLEAP_FEEDBACK_EMAIL_ADDR, subject: "Feedback: generation flagged", - body: emailContent, + htmlBody: emailContent, }); }; diff --git a/packages/core/src/utils/sendJudgementFeedbackEmail.ts b/packages/core/src/utils/sendJudgementFeedbackEmail.ts index a562adee3..35f5017c5 100644 --- a/packages/core/src/utils/sendJudgementFeedbackEmail.ts +++ b/packages/core/src/utils/sendJudgementFeedbackEmail.ts @@ -22,27 +22,27 @@ export const sendJudgementFeedbackEmail = async (input: { const { user, feedback, flaggedItem } = input; const inputDataAsString = JSON.stringify(input); - const emailContent = ` - User ${user.email} has clicked on the flag button on a comparative judgement. - Please check the database for more information: + const emailContent = `
+ User ${user.email} has clicked on the flag button on a comparative judgement.
+ Please check the database for more information:
+
+
-
+ ${flaggedItem}
+ Feedback: ${feedback.typedFeedback}
+ Inappropriate content: ${feedback.contentIsInappropriate}
+ Factually incorrect content: ${feedback.contentIsFactuallyIncorrect}
+ Not helpful content: ${feedback.contentIsNotHelpful}
+ Full data of the time of the flag:
- ${flaggedItem}
- Feedback: ${feedback.typedFeedback}
- Inappropriate content: ${feedback.contentIsInappropriate}
- Factually incorrect content: ${feedback.contentIsFactuallyIncorrect}
- Not helpful content: ${feedback.contentIsNotHelpful}
- Full data of the time of the flag:
-
- ${inputDataAsString}
+ ${inputDataAsString}
+ User ${user.email} has clicked on the flag button.
+
+ Flagged content type: ${flaggedItem.type}
+ Flagged content: ${flaggedItem.value}
+ Generation ID: ${flaggedItem.lastGenerationId}
+ Feedback: ${feedback.typedFeedback}
+ Inappropriate content: ${feedback.contentIsInappropriate}
+ Factually incorrect content: ${feedback.contentIsFactuallyIncorrect}
+ Not helpful content: ${feedback.contentIsNotHelpful}
+ Generation response: ${generationResponse}
+ Full data of the time of the flag:
+
+ ${inputDataAsString}