Documentation ¶
Index ¶
- type Attachment
- type Driver
- type EmailAddress
- type MailGunConfig
- type MailGunDriver
- func (m *MailGunDriver) Send() error
- func (m *MailGunDriver) SetAttachments(attachments []Attachment) error
- func (m *MailGunDriver) SetBCC(bccList []mail.Address) error
- func (m *MailGunDriver) SetCC(ccList []mail.Address) error
- func (m *MailGunDriver) SetFrom(from mail.Address) error
- func (m *MailGunDriver) SetHTMLBody(body string) error
- func (m *MailGunDriver) SetPlainTextBody(body string) error
- func (m *MailGunDriver) SetSubject(Subject string) error
- func (m *MailGunDriver) SetTo(toList []mail.Address) error
- type Mailer
- func (m *Mailer) Send() error
- func (m *Mailer) SetAttachments(attachments []Attachment) *Mailer
- func (m *Mailer) SetBCC(emailAddresses []EmailAddress) *Mailer
- func (m *Mailer) SetCC(emailAddresses []EmailAddress) *Mailer
- func (m *Mailer) SetFrom(emailAddress EmailAddress) *Mailer
- func (m *Mailer) SetHTMLBody(body string) *Mailer
- func (m *Mailer) SetPlainTextBody(body string) *Mailer
- func (m *Mailer) SetSubject(subject string) *Mailer
- func (m *Mailer) SetTo(emailAddresses []EmailAddress) *Mailer
- type SMTPConfig
- type SendGridConfig
- type SendGridDriver
- func (s *SendGridDriver) Send() error
- func (s *SendGridDriver) SetAttachments(attachments []Attachment) error
- func (s *SendGridDriver) SetBCC(bccList []mail.Address) error
- func (s *SendGridDriver) SetCC(ccList []mail.Address) error
- func (s *SendGridDriver) SetFrom(from mail.Address) error
- func (s *SendGridDriver) SetHTMLBody(body string) error
- func (s *SendGridDriver) SetPlainTextBody(body string) error
- func (s *SendGridDriver) SetSubject(Subject string) error
- func (s *SendGridDriver) SetTo(toList []mail.Address) error
- type SparkPostConfig
- type SparkPostDriver
- func (s *SparkPostDriver) Send() error
- func (s *SparkPostDriver) SetAttachments(attachments []Attachment) error
- func (s *SparkPostDriver) SetBCC(bccList []mail.Address) error
- func (s *SparkPostDriver) SetCC(ccList []mail.Address) error
- func (s *SparkPostDriver) SetFrom(from mail.Address) error
- func (s *SparkPostDriver) SetHTMLBody(body string) error
- func (s *SparkPostDriver) SetPlainTextBody(body string) error
- func (s *SparkPostDriver) SetSubject(Subject string) error
- func (s *SparkPostDriver) SetTo(toList []mail.Address) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attachment ¶
type Driver ¶
type Driver interface { Send() error SetFrom(from mail.Address) error SetTo(toList []mail.Address) error SetCC(ccList []mail.Address) error SetBCC(bccList []mail.Address) error SetSubject(subject string) error SetHTMLBody(body string) error SetPlainTextBody(body string) error SetAttachments(attachments []Attachment) error }
type EmailAddress ¶
type MailGunConfig ¶ added in v1.2.0
type MailGunDriver ¶ added in v1.2.0
type MailGunDriver struct {
// contains filtered or unexported fields
}
func (*MailGunDriver) Send ¶ added in v1.2.0
func (m *MailGunDriver) Send() error
func (*MailGunDriver) SetAttachments ¶ added in v1.2.0
func (m *MailGunDriver) SetAttachments(attachments []Attachment) error
func (*MailGunDriver) SetBCC ¶ added in v1.2.0
func (m *MailGunDriver) SetBCC(bccList []mail.Address) error
func (*MailGunDriver) SetCC ¶ added in v1.2.0
func (m *MailGunDriver) SetCC(ccList []mail.Address) error
func (*MailGunDriver) SetFrom ¶ added in v1.2.0
func (m *MailGunDriver) SetFrom(from mail.Address) error
func (*MailGunDriver) SetHTMLBody ¶ added in v1.2.0
func (m *MailGunDriver) SetHTMLBody(body string) error
func (*MailGunDriver) SetPlainTextBody ¶ added in v1.2.0
func (m *MailGunDriver) SetPlainTextBody(body string) error
func (*MailGunDriver) SetSubject ¶ added in v1.2.0
func (m *MailGunDriver) SetSubject(Subject string) error
type Mailer ¶
type Mailer struct {
// contains filtered or unexported fields
}
func NewMailerWithMailGun ¶
func NewMailerWithMailGun(config *MailGunConfig) *Mailer
Initiate the mailer with MailGun driver
func NewMailerWithSMTP ¶
func NewMailerWithSMTP(config *SMTPConfig) *Mailer
Initiate the mailer with SMTP driver
func NewMailerWithSendGrid ¶
func NewMailerWithSendGrid(config *SendGridConfig) *Mailer
Initiate the mailer with SendGrid driver
func NewMailerWithSparkPost ¶
func NewMailerWithSparkPost(config *SparkPostConfig) *Mailer
Initiate the mailer with SparkPost driver
func (*Mailer) SetAttachments ¶
func (m *Mailer) SetAttachments(attachments []Attachment) *Mailer
Add attachments to the email
func (*Mailer) SetBCC ¶
func (m *Mailer) SetBCC(emailAddresses []EmailAddress) *Mailer
List of bcc of the email
func (*Mailer) SetCC ¶
func (m *Mailer) SetCC(emailAddresses []EmailAddress) *Mailer
List of cc of the email
func (*Mailer) SetFrom ¶
func (m *Mailer) SetFrom(emailAddress EmailAddress) *Mailer
Sender of the email
func (*Mailer) SetHTMLBody ¶
Set the body of the email in html format make sure to use only one version of the email body, either the html or the plain text to use the html, call the function SetHTMLBody(body string) and if you want to use the text, call the function SetPlainTextBody(body string)
func (*Mailer) SetPlainTextBody ¶
Set the body of the email in plain text format make sure to use only one version of the email body, either the html or the plain text to use the html, call the function SetHTMLBody(body string) and if you want to use the text, call the function SetPlainTextBody(body string)
func (*Mailer) SetTo ¶
func (m *Mailer) SetTo(emailAddresses []EmailAddress) *Mailer
List of receivers of the email
type SMTPConfig ¶
type SendGridConfig ¶ added in v1.2.0
type SendGridConfig struct { Host string // "https://api.sendgrid.com" Endpoint string // "/v3/mail/send" ApiKey string // SENDGRID_API_KEY }
type SendGridDriver ¶ added in v1.2.0
type SendGridDriver struct {
// contains filtered or unexported fields
}
func (*SendGridDriver) Send ¶ added in v1.2.0
func (s *SendGridDriver) Send() error
func (*SendGridDriver) SetAttachments ¶ added in v1.2.0
func (s *SendGridDriver) SetAttachments(attachments []Attachment) error
func (*SendGridDriver) SetBCC ¶ added in v1.2.0
func (s *SendGridDriver) SetBCC(bccList []mail.Address) error
func (*SendGridDriver) SetCC ¶ added in v1.2.0
func (s *SendGridDriver) SetCC(ccList []mail.Address) error
func (*SendGridDriver) SetFrom ¶ added in v1.2.0
func (s *SendGridDriver) SetFrom(from mail.Address) error
func (*SendGridDriver) SetHTMLBody ¶ added in v1.2.0
func (s *SendGridDriver) SetHTMLBody(body string) error
func (*SendGridDriver) SetPlainTextBody ¶ added in v1.2.0
func (s *SendGridDriver) SetPlainTextBody(body string) error
func (*SendGridDriver) SetSubject ¶ added in v1.2.0
func (s *SendGridDriver) SetSubject(Subject string) error
type SparkPostConfig ¶ added in v1.2.0
type SparkPostConfig struct { BaseUrl string // example: https://api.sparkpost.com ApiKey string // SPARKPOST_API_KEY ApiVersion int // example: 1 }
type SparkPostDriver ¶ added in v1.2.0
type SparkPostDriver struct {
// contains filtered or unexported fields
}
func (*SparkPostDriver) Send ¶ added in v1.2.0
func (s *SparkPostDriver) Send() error
func (*SparkPostDriver) SetAttachments ¶ added in v1.2.0
func (s *SparkPostDriver) SetAttachments(attachments []Attachment) error
func (*SparkPostDriver) SetBCC ¶ added in v1.2.0
func (s *SparkPostDriver) SetBCC(bccList []mail.Address) error
func (*SparkPostDriver) SetCC ¶ added in v1.2.0
func (s *SparkPostDriver) SetCC(ccList []mail.Address) error
func (*SparkPostDriver) SetFrom ¶ added in v1.2.0
func (s *SparkPostDriver) SetFrom(from mail.Address) error
func (*SparkPostDriver) SetHTMLBody ¶ added in v1.2.0
func (s *SparkPostDriver) SetHTMLBody(body string) error
func (*SparkPostDriver) SetPlainTextBody ¶ added in v1.2.0
func (s *SparkPostDriver) SetPlainTextBody(body string) error
func (*SparkPostDriver) SetSubject ¶ added in v1.2.0
func (s *SparkPostDriver) SetSubject(Subject string) error