2022-03-09 16:52:23 +01:00
|
|
|
package mail
|
|
|
|
|
2022-03-10 16:19:51 +01:00
|
|
|
// Header represents a generic mail header field name
|
2022-03-09 16:52:23 +01:00
|
|
|
type Header string
|
|
|
|
|
2022-03-10 16:19:51 +01:00
|
|
|
// AddrHeader represents a address related mail Header field name
|
|
|
|
type AddrHeader string
|
2022-03-09 16:52:23 +01:00
|
|
|
|
2022-03-10 16:19:51 +01:00
|
|
|
// List of common generic header field names
|
|
|
|
const (
|
2022-03-10 16:56:41 +01:00
|
|
|
// HeaderContentLang is the "Content-Language" header
|
|
|
|
HeaderContentLang Header = "Content-Language"
|
|
|
|
|
|
|
|
// HeaderContentType is the "Content-Type" header
|
|
|
|
HeaderContentType Header = "Content-Type"
|
|
|
|
|
2022-03-09 16:52:23 +01:00
|
|
|
// HeaderDate represents the "Date" field
|
|
|
|
// See: https://www.rfc-editor.org/rfc/rfc822#section-5.1
|
|
|
|
HeaderDate Header = "Date"
|
|
|
|
|
2022-03-11 10:29:44 +01:00
|
|
|
// HeaderInReplyTo represents the "In-Reply-To" field
|
|
|
|
HeaderInReplyTo Header = "In-Reply-To"
|
|
|
|
|
|
|
|
// HeaderListUnsubscribe is the "List-Unsubscribe" header field
|
|
|
|
HeaderListUnsubscribe Header = "List-Unsubscribe"
|
|
|
|
|
|
|
|
// HeaderListUnsubscribePost is the "List-Unsubscribe-Post" header field
|
|
|
|
HeaderListUnsubscribePost Header = "List-Unsubscribe-Post"
|
|
|
|
|
2022-03-09 16:52:23 +01:00
|
|
|
// 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"
|
2022-03-10 16:19:51 +01:00
|
|
|
|
2022-03-10 16:56:41 +01:00
|
|
|
// HeaderMIMEVersion represents the "MIME-Version" field as per RFC 2045
|
|
|
|
// See: https://datatracker.ietf.org/doc/html/rfc2045#section-4
|
|
|
|
HeaderMIMEVersion Header = "MIME-Version"
|
|
|
|
|
2022-03-11 10:29:44 +01:00
|
|
|
// HeaderPrecedence is the "Precedence" header field
|
2022-03-10 16:19:51 +01:00
|
|
|
HeaderPrecedence Header = "Precedence"
|
|
|
|
|
2022-03-11 10:29:44 +01:00
|
|
|
// HeaderReplyTo is the "Reply-To" header field
|
|
|
|
HeaderReplyTo Header = "Reply-To"
|
|
|
|
|
|
|
|
// HeaderSubject is the "Subject" header field
|
2022-03-10 16:19:51 +01:00
|
|
|
HeaderSubject Header = "Subject"
|
|
|
|
)
|
|
|
|
|
|
|
|
// List of common generic header field names
|
|
|
|
const (
|
2022-03-11 10:29:44 +01:00
|
|
|
// HeaderBcc is the "Blind Carbon Copy" header field
|
2022-03-10 16:19:51 +01:00
|
|
|
HeaderBcc AddrHeader = "Bcc"
|
|
|
|
|
2022-03-11 10:29:44 +01:00
|
|
|
// HeaderCc is the "Carbon Copy" header field
|
2022-03-10 16:19:51 +01:00
|
|
|
HeaderCc AddrHeader = "Cc"
|
|
|
|
|
2022-03-11 10:29:44 +01:00
|
|
|
// HeaderFrom is the "From" header field
|
2022-03-10 16:19:51 +01:00
|
|
|
HeaderFrom AddrHeader = "From"
|
|
|
|
|
2022-03-11 10:29:44 +01:00
|
|
|
// HeaderTo is the "Receipient" header field
|
2022-03-10 16:19:51 +01:00
|
|
|
HeaderTo AddrHeader = "To"
|
2022-03-09 16:52:23 +01:00
|
|
|
)
|