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 Config ¶ added in v0.12.0
type Config struct { Clock Clock MessageID MessageIDFactory }
Config is the builder config.
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 MessageIDFactory ¶ added in v0.12.0
MessageIDFactory generates Message-IDs.
func UUIDGenerator ¶ added in v0.11.0
func UUIDGenerator(domain string) MessageIDFactory
UUIDGenerator returns a Message-ID factory using UUIDs. If domain is an empty string, it is set to "localhost". The generated IDs have the following format: <UUID@DOMAIN>
type MessageIDFunc ¶ added in v0.12.0
MessageIDFunc allows a function to be used as an MessageIDFactory.
func (MessageIDFunc) GenerateID ¶ added in v0.12.0
func (id MessageIDFunc) GenerateID(m Mail) string
GenerateID generates a Message-ID.
type Option ¶ added in v0.11.0
type Option func(*Config)
Option is a builder option.
func WithMessageID ¶ added in v0.12.0
WithMessageID returns an Option that sets the Message-ID of the mail.
func WithMessageIDFactory ¶ added in v0.12.1
func WithMessageIDFactory(id MessageIDFactory) Option
WithMessageIDFactory returns an Option that specifies the used MessageIDFactory.
Click to show internal directories.
Click to hide internal directories.