package user
import (
"fmt"
"github.com/azukaar/cosmos-server/src/utils"
)
func SendInviteEmail(nickname string, email string, link string) error {
return utils.SendEmail(
[]string{email},
"Cosmos Invitation for " + nickname,
fmt.Sprintf(`
You have been invited!
Hello %s,
The admin of a Cosmos Server invited you to join their server.
In order to join, you can click the following link to setup your account:
Setup
See you soon!!
`, nickname, link))
}
func SendAdminPasswordEmail(nickname string, email string, link string) error {
return utils.SendEmail(
[]string{email},
"Cosmos Password Reset",
fmt.Sprintf(`Password Reset
Hello %s,
The admin of a Cosmos Server has sent you a password reset link.
In order to reset your password, you can click the following link and fill in the form:
Reset Password
See you soon!!
`, nickname, link))
}
func SendPasswordEmail(nickname string, email string, link string) error {
return utils.SendEmail(
[]string{email},
"Cosmos Password Reset",
fmt.Sprintf(`Password Reset
Hello %s,
You have requested a password reset. If it wasn't you, please alert your server admin.
If it was you, you can click the following link and fill in the form:
Reset Password
See you soon!!
`, nickname, link))
}