invite.go 738 B

123456789101112131415161718192021222324252627
  1. package email
  2. import (
  3. "fmt"
  4. )
  5. // UserInvitedMail - mail for users that are invited to a tenant
  6. type UserInvitedMail struct {
  7. BodyBuilder EmailBodyBuilder
  8. InviteURL string
  9. }
  10. // GetSubject - gets the subject of the email
  11. func (UserInvitedMail) GetSubject(info Notification) string {
  12. return "Netmaker: Pending Invitation"
  13. }
  14. // GetBody - gets the body of the email
  15. func (invite UserInvitedMail) GetBody(info Notification) string {
  16. return invite.BodyBuilder.
  17. WithHeadline("Join Netmaker from this invite!").
  18. WithParagraph("Hello from Netmaker,").
  19. WithParagraph("You have been invited to join Netmaker.").
  20. WithParagraph(fmt.Sprintf("Join Using This Invite Link <a href=\"%s\">Netmaker</a>", invite.InviteURL)).
  21. Build()
  22. }