Documentation ¶
Index ¶
Constants ¶
View Source
const ContactTemplate = emailTemplate("contact-template")
ContactTemplate is the ID for contact email template
View Source
const ForgotPasswordTemplate = emailTemplate("forgot-password-template")
ForgotPasswordTemplate is the ID for email template
View Source
const NeedResponseTemplate = emailTemplate("need-response-template")
NeedResponseTemplate sis the ID for need response template
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EmailParams ¶
type EmailParams struct { To string CC string Subject string Template emailTemplate Variables map[string]string }
EmailParams struct with emails infos
type Mailer ¶
type Mailer interface {
SendEmail(EmailParams) error
}
Mailer is a implementation to send emails
func SendgridConnect ¶
SendgridConnect - Create and return a mailer
type SMTPMailer ¶
type SMTPMailer struct {
Dial *gomail.SendCloser
}
SMTPMailer is a implementation of SMTP
func (SMTPMailer) SendEmail ¶
func (mailer SMTPMailer) SendEmail(params EmailParams) error
SendEmail - Send email with SMTPMailer
type SendGridMailer ¶
SendGridMailer is a implementation of SendGrid API
func (SendGridMailer) SendEmail ¶
func (mailer SendGridMailer) SendEmail(params EmailParams) error
SendEmail - Send email with SendGridMailer
Click to show internal directories.
Click to hide internal directories.