Documentation
¶
Index ¶
- type EmailConfig
- func (c *EmailConfig) HasMailGunConfigExplicitlySet() bool
- func (c *EmailConfig) LoadMailGunConfigFromEnv() bool
- func (c *EmailConfig) Send(m *EmailMessage) (string, error)
- func (c *EmailConfig) SendMailGun(m *EmailMessage) (string, error)
- func (c *EmailConfig) SendSMTP(m *EmailMessage) (string, error)
- type EmailMessage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EmailConfig ¶
type EmailConfig struct {
ServerName string `json:"servername"`
UserName string `json:"username"`
Password string `json:"password"`
Key string `json:"-"`
PublicKey string `json:"publickey"`
Domain string `json:"domain"`
}
func (*EmailConfig) HasMailGunConfigExplicitlySet ¶
func (c *EmailConfig) HasMailGunConfigExplicitlySet() bool
func (*EmailConfig) LoadMailGunConfigFromEnv ¶
func (c *EmailConfig) LoadMailGunConfigFromEnv() bool
func (*EmailConfig) Send ¶
func (c *EmailConfig) Send(m *EmailMessage) (string, error)
func (*EmailConfig) SendMailGun ¶
func (c *EmailConfig) SendMailGun(m *EmailMessage) (string, error)
func (*EmailConfig) SendSMTP ¶
func (c *EmailConfig) SendSMTP(m *EmailMessage) (string, error)
type EmailMessage ¶
type EmailMessage struct {
// the full HTML content to be sent
HTML string `json:"html,omitempty"`
// optional full text content to be sent
Text string `json:"text,omitempty"`
// the message subject
Subject string `json:"subject,omitempty"`
// the sender email address.
FromEmail string `json:"from_email,omitempty"`
// optional from name to be used
FromName string `json:"from_name,omitempty"`
// the email address of the recipient
ToEmail string `json:"email"`
// the optional display name to use for the recipient
Name string `json:"name,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.