package email import "fmt" func emailWrapper(content string) string { return fmt.Sprintf(`
%sThis is an automated message. Please do not reply directly to this email.
`, content) } func renderVerificationEmail(name, verifyURL string) string { return emailWrapper(fmt.Sprintf(`Hi %s,
Please verify your email address by clicking the button below:
Or copy and paste this link into your browser:
%s
This link expires in 24 hours.
`, name, verifyURL, verifyURL)) } func renderPasswordResetEmail(name, resetURL string) string { return emailWrapper(fmt.Sprintf(`Hi %s,
We received a request to reset your password. Click the button below to set a new one:
Or copy and paste this link into your browser:
%s
This link expires in 1 hour. If you didn't request this, please ignore this email.
`, name, resetURL, resetURL)) } func renderTicketClosedEmail(name, ticketTitle, ticketURL string) string { return emailWrapper(fmt.Sprintf(`Hi %s,
Your ticket "%s" has been resolved by our team.
If you believe the issue is not fully resolved, you can add a comment on the ticket page.
`, name, ticketTitle, ticketURL)) } func renderWelcomeEmail(name, email, tempPassword, loginURL string) string { return emailWrapper(fmt.Sprintf(`Hi %s,
An account has been created for you. Here are your login details:
| Email: | %s |
| Temporary Password: | %s |
Please change your password after logging in.
`, name, email, tempPassword, loginURL)) }