Documentation ¶
Index ¶
Constants ¶
View Source
const ( SendInBlue = iota SendGrid MailGun )
constant uint values for the choices of platform
Variables ¶
View Source
var EnvVarNames = map[uint]map[string]string{ SendGrid: { "key": "SENDGRID_API_KEY", "sender": "SENDGRID_SENDER", }, SendInBlue: { "key": "SENDINBLUE_API_KEY", "sender": "SENDINBLUE_SENDER", }, MailGun: { "key": "MAILGUN_API_KEY", "baseurl": "MAILGUN_BASE_URL", }, }
EnvVarNames stores the set of required .env keys required
by each platform when sending
Functions ¶
This section is empty.
Types ¶
type Email ¶
type Email struct { ToName string ToAddr string TextBody string Subject string ReplyToName string ReplyToAddr string HTMLBody string FromName string FromAddr string // contains filtered or unexported fields }
Email defineds a data structure for a single message from one to one person independent of platform
func NewTransactional ¶
NewTransactional looks at the environment and returns a sendable email or an error
func NewTransactionalWithEnv ¶
NewTransactionalWithEnv can be called with the environment variables rather than parsing them with os.GetEnv
Click to show internal directories.
Click to hide internal directories.