package email import "fmt" func emailWrapper(content string) string { return fmt.Sprintf(` %s

This is an automated message. Please do not reply directly to this email.

`, content) } func renderVerificationEmail(name, verifyURL string) string { return emailWrapper(fmt.Sprintf(`

Verify your email address

Hi %s,

Please verify your email address by clicking the button below:

Verify Email

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(`

Reset your password

Hi %s,

We received a request to reset your password. Click the button below to set a new one:

Reset Password

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(`

Your ticket has been resolved

Hi %s,

Your ticket "%s" has been resolved by our team.

View Ticket

If you believe the issue is not fully resolved, you can add a comment on the ticket page.

`, name, ticketTitle, ticketURL)) } func renderAccountApprovedEmail(name, loginURL string) string { return emailWrapper(fmt.Sprintf(`

Your account has been approved

Hi %s,

Your account request has been approved. You can now log in and start creating tickets.

Log In

`, name, loginURL)) } func renderWelcomeEmail(name, email, tempPassword, loginURL string) string { return emailWrapper(fmt.Sprintf(`

Welcome!

Hi %s,

An account has been created for you. Here are your login details:

Email:%s
Temporary Password:%s

Log In

Please change your password after logging in.

`, name, email, tempPassword, loginURL)) }