email

package
v0.0.0-...-f616806 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 10, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEmail

func NewEmail(from, subject, body, to, firstName, lastName string, emailType contracts.EmailType) *contracts.EmailContract

Types

type MailClient

type MailClient struct {
	Mailer   *Mailer
	Client   *sendgrid.Client
	Logger   *zap.Logger
	Telemery *counters.Telemetry
}

func NewMailClient

func NewMailClient(apiKey string, logger *zap.Logger, telemetry *counters.Telemetry) *MailClient

func (*MailClient) Callback

func (client *MailClient) Callback() func(amqp.Delivery) error

func (*MailClient) SendEmail

func (client *MailClient) SendEmail(email contracts.EmailContract) (string, error)

type Mailer

type Mailer struct {
	Hermes hermes.Hermes
}

func NewMailer

func NewMailer() *Mailer

func (*Mailer) InviteEmailHTML

func (m *Mailer) InviteEmailHTML(firstName, lastName string) (string, error)

InviteEmailHTML sends a sample invite email html template

func (*Mailer) InviteEmailPlaintext

func (m *Mailer) InviteEmailPlaintext(firstName, lastName string) (string, error)

InviteEmailPlaintext sends a sample invite email plaintext template

func (*Mailer) ResetEmailHTML

func (m *Mailer) ResetEmailHTML(firstName, lastName string) (string, error)

ResetEmailHTML sends a sample reset email html template

func (*Mailer) ResetEmailPlaintext

func (m *Mailer) ResetEmailPlaintext(firstName, lastName string) (string, error)

ResetEmailPlaintext sends a sample reset plaintext template

func (*Mailer) WelcomeEmailHTML

func (m *Mailer) WelcomeEmailHTML(firstName, lastName string) (string, error)

WelcomeEmailHTML sends a sample welcome email html template

func (*Mailer) WelcomeEmailPlaintext

func (m *Mailer) WelcomeEmailPlaintext(firstName, lastName string) (string, error)

WelcomeEmailPlaintext sends a sample welcome email html template

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL