Documentation ¶
Overview ¶
package ezmail implements basic mail creation to ease the net/smtp package use
Index ¶
- type Message
- func (msg *Message) AddBcc(name, email string)
- func (msg *Message) AddCc(name, email string)
- func (msg *Message) AddTo(name, email string)
- func (msg *Message) Bytes() []byte
- func (msg *Message) Recipients() []string
- func (msg *Message) RecipientsEmails() []string
- func (msg *Message) SetFrom(name, email string)
- func (msg *Message) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Message ¶
A Message represents an electronic message Usage: msg := ezmail.Message{} msg.SetFrom("Marc Weistroff", "marc@example.org") msg.AddTo("Recipient 1", "recipient1@example.org") msg.AddTo("", "foobar@example.org") msg.AddCC("", "cc@example.org") msg.Subject = "Hey, message subject" msg.Body = "plain text body" smtp.SendMail(addr, auth, msg.From.String(), msg.Recipients(), msg.Bytes())
func NewMessage ¶
func NewMessage() *Message
func (*Message) Recipients ¶
Returns list of recipients (Format: "Recipient Name <recipientemail@example.com>")
func (*Message) RecipientsEmails ¶
Returns list of recipient email addresses
Click to show internal directories.
Click to hide internal directories.