Documentation
¶
Index ¶
Constants ¶
View Source
const ( // VerificationSubject is the subject for verification emails VerificationSubject = "Netsoc account verification" // EmailResetPasswordSubject is the subject for password reset emails ResetPasswordSubject = "Netsoc account password reset" )
Variables ¶
View Source
var ( // EmailVerificationAPI is a template for an email with API-based verification VerificationAPI = template.Must(template.New("email_verification.txt").Parse(`Hi {{.User.FirstName}}, Thanks for signing up to Netsoc! Here's your verification token: {{.Token}} Regards, The Netsoc Team `)) // EmailVerificationUI is a template for an email with UI-based verification VerificationUI = template.Must(template.New("email_verification.txt").Parse(`Hi {{.User.FirstName}}, Thanks for signing up to Netsoc! Click the following link to verify your account: {{template "url" .}} Regards, The Netsoc Team `)) // ResetPasswordAPI is a template for an email with API-based password reset ResetPasswordAPI = template.Must(template.New("email_verification.txt").Parse(`Hi {{.User.FirstName}}, Here's your password reset token: {{.Token}} If you didn't initiate the reset, you can ignore this email. Regards, The Netsoc Team `)) // ResetPasswordUI is a template for an email with UI-based password reset ResetPasswordUI = template.Must(template.New("email_verification.txt").Parse(`Hi {{.User.FirstName}}, Click the following link to reset your password: {{template "url" .}} If you didn't initiate the reset, you can ignore this email. Regards, The Netsoc Team `)) )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { From string ReplyTo string `mapstructure:"reply_to"` VerifyURL string `mapstructure:"verify_url"` ResetURL string `mapstructure:"reset_url"` }
Config represents a Sender's configuration
type SMTPConfig ¶
type SMTPSender ¶
type SMTPSender struct {
// contains filtered or unexported fields
}
func NewSMTPSender ¶
func NewSMTPSender(c Config, smtpConfig SMTPConfig) (*SMTPSender, error)
func (*SMTPSender) Config ¶
func (m *SMTPSender) Config() *Config
Click to show internal directories.
Click to hide internal directories.