From 287e6e9c551cf8c8a852b94f655bcbae8e11cc70 Mon Sep 17 00:00:00 2001 From: DEVESH PATEL <113835041+devesh711@users.noreply.github.com> Date: Tue, 8 Oct 2024 17:06:48 +0530 Subject: [PATCH] Issue #44 Fixed Updated email notification (#45) --- pkg/server/routes.go | 38 +++++++++++++++++++++++++++++++++----- pkg/server/routes_test.go | 3 ++- 2 files changed, 35 insertions(+), 6 deletions(-) diff --git a/pkg/server/routes.go b/pkg/server/routes.go index d9b57a9..b3057b8 100644 --- a/pkg/server/routes.go +++ b/pkg/server/routes.go @@ -123,11 +123,39 @@ func (ctrl *Controller) CreateJob(ctx *gin.Context) { if ctrl.EmailService != nil { // TODO: make this a nicer html template? - message := fmt.Sprintf( - "Your job has been created!\n\nUse this link to edit the job posting", - SignedJobRoute(job, ctrl.Config), - ) - err = ctrl.EmailService.SendEmail(newJobInput.Email, "Job Created!", message) + subject := fmt.Sprintf("Job %s Created!", newJobInput.Position) + message := fmt.Sprintf(` + + +
+ + +Congratulations! Your job posting for the position %s has been successfully created.
+You can edit or update your job posting by clicking the link below:
+ + +