55 lines
1.7 KiB
Go
55 lines
1.7 KiB
Go
|
// SPDX-FileCopyrightText: 2022-2023 The go-mail Authors
|
||
|
//
|
||
|
// SPDX-License-Identifier: MIT
|
||
|
|
||
|
package mail
|
||
|
|
||
|
// Header represents a generic mail header field name
|
||
|
type Header string
|
||
|
|
||
|
// AddrHeader represents an address related mail Header field name
|
||
|
type AddrHeader string
|
||
|
|
||
|
// List of common generic header field names
|
||
|
const (
|
||
|
// HeaderContentTransferEnc is the "Content-Transfer-Encoding" header
|
||
|
HeaderContentTransferEnc Header = "Content-Transfer-Encoding"
|
||
|
|
||
|
// HeaderContentType is the "Content-Type" header
|
||
|
HeaderContentType Header = "Content-Type"
|
||
|
|
||
|
// HeaderDate represents the "Date" field
|
||
|
// See: https://www.rfc-editor.org/rfc/rfc822#section-5.1
|
||
|
HeaderDate Header = "Date"
|
||
|
|
||
|
// HeaderMessageID represents the "Message-ID" field for message identification
|
||
|
// See: https://www.rfc-editor.org/rfc/rfc1036#section-2.1.5
|
||
|
HeaderMessageID Header = "Message-ID"
|
||
|
|
||
|
// HeaderMIMEVersion represents the "MIME-Version" field as per RFC 2045
|
||
|
// See: https://datatracker.ietf.org/doc/html/rfc2045#section-4
|
||
|
HeaderMIMEVersion Header = "MIME-Version"
|
||
|
|
||
|
// HeaderReplyTo is the "Reply-To" header field
|
||
|
HeaderReplyTo Header = "Reply-To"
|
||
|
|
||
|
// HeaderSubject is the "Subject" header field
|
||
|
HeaderSubject Header = "Subject"
|
||
|
)
|
||
|
|
||
|
// List of common address header field names
|
||
|
const (
|
||
|
// HeaderCc is the "Carbon Copy" header field
|
||
|
HeaderCc AddrHeader = "Cc"
|
||
|
|
||
|
// HeaderEnvelopeFrom is the envelope FROM header field
|
||
|
// It's not included in the mail body but only used by the Client for the envelope
|
||
|
HeaderEnvelopeFrom AddrHeader = "EnvelopeFrom"
|
||
|
|
||
|
// HeaderFrom is the "From" header field
|
||
|
HeaderFrom AddrHeader = "From"
|
||
|
|
||
|
// HeaderTo is the "Recipient" header field
|
||
|
HeaderTo AddrHeader = "To"
|
||
|
)
|