mirror of
https://github.com/wneessen/go-mail.git
synced 2024-11-09 15:32:54 +01:00
Add support for US-ASCII (7bit) encoding
Implemented a new encoding type, `EncodingUSASCII`, representing US-ASCII (7bit) encoding. Updated the test suite to include this new encoding in the test cases, ensuring proper validation and coverage.
This commit is contained in:
parent
b4acaf1406
commit
a28cf14efd
2 changed files with 4 additions and 0 deletions
|
@ -27,6 +27,9 @@ const (
|
|||
// EncodingQP represents the "quoted-printable" encoding as specified in RFC 2045.
|
||||
EncodingQP Encoding = "quoted-printable"
|
||||
|
||||
// EncodingUSASCII represents encoding with only US-ASCII characters (aka 7Bit)
|
||||
EncodingUSASCII Encoding = "7bit"
|
||||
|
||||
// NoEncoding avoids any character encoding (except of the mail headers)
|
||||
NoEncoding Encoding = "8bit"
|
||||
)
|
||||
|
|
|
@ -16,6 +16,7 @@ func TestEncoding_String(t *testing.T) {
|
|||
{"Encoding: Base64", EncodingB64, "base64"},
|
||||
{"Encoding: QP", EncodingQP, "quoted-printable"},
|
||||
{"Encoding: None/8bit", NoEncoding, "8bit"},
|
||||
{"Encoding: US-ASCII/7bit", EncodingUSASCII, "7bit"},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
|
|
Loading…
Reference in a new issue