Documentation ¶
Index ¶
Constants ¶
View Source
const MIME = "MIME-version: 1.0;\r\nContent-Type: text/html; charset=\"utf-8\";\r\nContent-Transfer-Encoding: quoted-printable\r\n"
Reference: https://www.w3.org/Protocols/rfc1341/7_3_Message.html
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct { ServerAddress string `json:"server_address"` // It is the Outgoing Mail (SMTP) Server Username string `json:"username"` // The e-mail address Password string `json:"password"` // The e-mail application password Port string `json:"port"` // The Outgoing Mail (SMTP) Port Content Content `json:"content,omitempty"` // Content of the email, subject and recipients CustomerSupport string `json:"customer_support"` // The e-mail address of the customer support service }
Configuration contains the configuration settings for sending emails to the client.
func (Configuration) Error ¶
func (email Configuration) Error(err error, code, message string, kv ...utility.KVP)
Error sets the default key-value pair.
func (Configuration) Send ¶
func (email Configuration) Send() error
Send authenticates and connects to the server (e.g. smtp.gmail.com:587) and sends an e-mail from address "from", to addresses "to", with message.
type Content ¶
type Content struct { To []string // Primary recipients of the e-mail CC []string // Carbon Copy; E-mail addresses of the recipients who will receive a copy of the e-mail BCC []string // Blind Carbon Copy; E-mail addresses of the recipients who will receive a copy of the e-mail Subject string // Subject of the e-mail Message string // The main body content of the e-mail }
Content represents the content of an e-mail message, subject, and to whom it will be sent.
Click to show internal directories.
Click to hide internal directories.