Documentation
¶
Overview ¶
Package email provides email sending functionality.
Index ¶
- func ProcessConfirmEmailFromQueue(paramsJSON []byte) error
- func ProcessResetPasswordEmailFromQueue(paramsJSON []byte) error
- func ProcessWelcomeEmailFromQueue(paramsJSON []byte) error
- func SendTestEmail()
- func SetSender(sender *Sender)
- func Setup() error
- type ConfirmEmailParams
- type ResetPasswordEmailParams
- type Sender
- type WelcomeEmailParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ProcessConfirmEmailFromQueue ¶
ProcessConfirmEmailFromQueue processes the parameters from the queue.
func ProcessResetPasswordEmailFromQueue ¶
ProcessResetPasswordEmailFromQueue processes the parameters from the queue.
func ProcessWelcomeEmailFromQueue ¶
ProcessWelcomeEmailFromQueue processes the parameters from the queue.
func SendTestEmail ¶
func SendTestEmail()
SendTestEmail provides a simple way to test SMTP configuration.
Types ¶
type ConfirmEmailParams ¶
type ConfirmEmailParams struct { ReceipientEmail string UserFirstName string ConfirmationLink string EmailFromName string }
ConfirmEmailParams holds parameters for the template.
func (*ConfirmEmailParams) AddToQueue ¶
func (params *ConfirmEmailParams) AddToQueue() error
AddToQueue adds the parameters to queue.
func (*ConfirmEmailParams) Send ¶
func (params *ConfirmEmailParams) Send() error
Send generates the email from the parameters and is sent.
type ResetPasswordEmailParams ¶
type ResetPasswordEmailParams struct { ReceipientEmail string UserFirstName string ResetPasswordLink string EmailFromName string }
ResetPasswordEmailParams holds parameters for the template.
func (*ResetPasswordEmailParams) AddToQueue ¶
func (params *ResetPasswordEmailParams) AddToQueue() error
AddToQueue adds the parameters to queue.
func (*ResetPasswordEmailParams) Send ¶
func (params *ResetPasswordEmailParams) Send() error
Send generates the email from the parameters and is sent.
type Sender ¶
type Sender struct { SMTPHost string SMTPPort int SMTPUsername string SMTPPassword string FromAddress string FromName string }
Sender holds the SMTP details.
func (*Sender) WriteHTMLEmail ¶
WriteHTMLEmail returns the HTML composed email.
func (*Sender) WritePlainEmail ¶
WritePlainEmail returns the plain text composed email.
type WelcomeEmailParams ¶
WelcomeEmailParams holds parameters for the template.
func (*WelcomeEmailParams) AddToQueue ¶
func (params *WelcomeEmailParams) AddToQueue() error
AddToQueue adds the parameters to queue.
func (*WelcomeEmailParams) Send ¶
func (params *WelcomeEmailParams) Send() error
Send generates the email from the parameters and is sent.