mail

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateMailBody

func GenerateMailBody(cfg *config.Config, message *AMQPMessage) (string, error)

GenerateMailBody generates mail body from configuration & message

func SendMail

func SendMail(message *AMQPMessage, cfg *config.Config, body *string) error

SendMail sends an email for verification.

Types

type AMQPMessage

type AMQPMessage struct {
	Email        string            `json:"email,omitempty"`
	Data         map[string]string `json:"data,omitempty"`
	TemplateName string            `json:"template,omitempty"`
}

AMQPMessage message received from AMQP server

func ParseAMQPMessage

func ParseAMQPMessage(body *[]byte) (AMQPMessage, error)

ParseAMQPMessage helper for parsing AMQP message Body to our AMQPMessage

type ForgotPasswordMail

type ForgotPasswordMail struct {
	URL  string `json:"url,omitempty"`
	Code string `json:"code,omitempty"`
}

ForgotPasswordMail object specified for forgot password mails

type VerificationMail

type VerificationMail struct {
	URL   string `json:"url,omitempty"`
	Token string `json:"token,omitempty"`
}

VerificationMail object specified for verification mails

Jump to

Keyboard shortcuts

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