message

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attachment

type Attachment struct {
	Filename string
	Data     []byte
	MIMEType string
}

Attachment attached files to Message.

type Message

type Message struct {
	// From whom is going to send that mail.
	From string
	// Recipients contains the primary recipients of the email.
	Recipients []string
	// Cc contains the recipients who will receive a carbon copy of the email.
	Cc []string
	// Bcc contains the recipients who will receive a blind carbon copy of the email.
	Bcc []string
	// Body and HTMLBody represent the content of the email. If both are present, the email will be sent as multipart/alternative,
	// allowing email clients to choose the most suitable version to display. Ensure that the content of Body and HTMLBody is equivalent
	// to provide a consistent user experience. For more details, refer to: https://datatracker.ietf.org/doc/html/rfc2046#section-5.1.4
	Body, HTMLBody string
	// Subject the subject of the email.
	Subject string
	// Headers Extra mail headers
	Headers mail.Header

	// Attachments any files attached to email.
	Attachments []Attachment
}

Message will be sent in email.

func NewMessage

func NewMessage() Message

func (Message) Encode

func (m Message) Encode() ([]byte, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL