netmaker/email/invite.go
2024-07-09 13:37:35 +05:30

27 lines
738 B
Go

package email
import (
"fmt"
)
// UserInvitedMail - mail for users that are invited to a tenant
type UserInvitedMail struct {
BodyBuilder EmailBodyBuilder
InviteURL string
}
// GetSubject - gets the subject of the email
func (UserInvitedMail) GetSubject(info Notification) string {
return "Netmaker: Pending Invitation"
}
// GetBody - gets the body of the email
func (invite UserInvitedMail) GetBody(info Notification) string {
return invite.BodyBuilder.
WithHeadline("Join Netmaker from this invite!").
WithParagraph("Hello from Netmaker,").
WithParagraph("You have been invited to join Netmaker.").
WithParagraph(fmt.Sprintf("Join Using This Invite Link <a href=\"%s\">Netmaker</a>", invite.InviteURL)).
Build()
}