Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Attachment ¶
type Attachment struct { Filename string Content []byte Header textproto.MIMEHeader }
Attachment is a mail attachment.
type IDGenerator ¶ added in v0.11.0
IDGenerator generates Message-IDs.
func UUIDGenerator ¶ added in v0.11.0
func UUIDGenerator(domain string) IDGenerator
UUIDGenerator returns a Message-ID generator using UUIDs. If domain is an empty string, it is set to "localhost". The generated IDs have the following format: <UUID@DOMAIN>
type IDGeneratorFunc ¶ added in v0.11.0
IDGeneratorFunc allows a function to be used as an IDGenerator.
func (IDGeneratorFunc) GenerateID ¶ added in v0.11.0
func (gen IDGeneratorFunc) GenerateID(m Mail) string
GenerateID generates a Message-ID.
type Mail ¶
type Mail struct { Subject string From mail.Address To []mail.Address CC []mail.Address BCC []mail.Address ReplyTo []mail.Address Text string HTML string Attachments []Attachment }
Mail contains the data of a mail.
type Option ¶ added in v0.11.0
type Option func(*builder)
Option is a builder option.
func WithIDGenerator ¶ added in v0.11.0
func WithIDGenerator(gen IDGenerator) Option
WithIDGenerator returns an Option that overrides the used IDGenerator.
Click to show internal directories.
Click to hide internal directories.