package email
import (
"fmt"
"github.com/gravitl/netmaker/servercfg"
)
// 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 "You're invited to join Netmaker"
}
// GetBody - gets the body of the email
func (invite UserInvitedMail) GetBody(info Notification) string {
if servercfg.DeployedByOperator() {
return invite.BodyBuilder.
WithParagraph("Hi there,").
WithParagraph("
").
WithParagraph("Great news! Your colleague has invited you to join their Netmaker SaaS Tenant.").
WithParagraph("Click the button to accept your invitation:").
WithParagraph("
").
WithParagraph(fmt.Sprintf("Accept Invitation", invite.InviteURL)).
WithParagraph("
").
WithParagraph("Why you'll love Netmaker:").
WithParagraph("
").
WithParagraph("- Blazing-fast connections with our WireGuard®-powered mesh VPN
").
WithParagraph("- Seamless multi-cloud and hybrid-cloud networking
").
WithParagraph("- Automated Kubernetes networking across any infrastructure
").
WithParagraph("- Enterprise-grade security with simple management
").
WithParagraph("
").
WithParagraph("Got questions? Our team is here to help you every step of the way.").
WithParagraph("
").
WithParagraph("Welcome aboard,").
WithParagraph("The Netmaker Team
").
WithParagraph("P.S. Curious to learn more before accepting? Check out our quick start tutorial at netmaker.io/tutorials").
Build()
}
return invite.BodyBuilder.
WithParagraph("Hi there,").
WithParagraph("
").
WithParagraph("Great news! Your colleague has invited you to join their Netmaker network.").
WithParagraph("Click the button to accept your invitation:").
WithParagraph("
").
WithParagraph(fmt.Sprintf("Accept Invitation", invite.InviteURL)).
WithParagraph("
").
WithParagraph("Why you'll love Netmaker:").
WithParagraph("").
WithParagraph("- Blazing-fast connections with our WireGuard®-powered mesh VPN
").
WithParagraph("- Seamless multi-cloud and hybrid-cloud networking
").
WithParagraph("- Automated Kubernetes networking across any infrastructure
").
WithParagraph("- Enterprise-grade security with simple management
").
WithParagraph("
").
WithParagraph("Got questions? Our team is here to help you every step of the way.").
WithParagraph("
").
WithParagraph("Welcome aboard,").
WithParagraph("The Netmaker Team
").
WithParagraph("P.S. Curious to learn more before accepting? Check out our quick start tutorial at netmaker.io/tutorials").
Build()
}