Skip to content

Commit 8f713af

Browse files
committedJun 7, 2024
Small formatting fixes for the message example.
1 parent 9d87c5d commit 8f713af

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed
 

‎examples/message.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ int main()
4343
string msg_str;
4444
msg.format(msg_str);
4545
cout << msg_str << endl;
46+
// The subject is printed as `=?UTF-8?Q?=D0=97=D0=B4=D1=80=D0=B0=D0=B2=D0=BE,_=D0=A1=D0=B2=D0=B5=D1=82=D0?=\r\n =?UTF-8?Q?=B5!?=`
4647
}
4748

4849
// Set the file encoding to UTF-8 to properly see the letters in this snippet.
@@ -84,12 +85,12 @@ int main()
8485
string msg_str;
8586
msg.format(msg_str);
8687
cout << msg_str << endl;
87-
// The subject is printed as `=?ISO-8859-5?Q?=B7=D4=E0=D0=D2=DE,_=C1=D2=D5=E2=D5?=`.
8888
}
8989

9090
// Set the file encoding to UTF-8 to properly see the letters in this snippet.
9191
{
9292
message msg;
93+
msg.header_codec(message::header_codec_t::QUOTED_PRINTABLE);
9394
msg.from(mail_address("mail io", "contact@mailio.dev"));
9495
msg.add_recipient(mail_address("mail io", "contact@mailio.dev"));
9596
msg.content_transfer_encoding(mime::content_transfer_encoding_t::BASE_64);

‎test/test_message.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -4503,7 +4503,7 @@ BOOST_AUTO_TEST_CASE(parse_attachment_utf8)
45034503
"Date: Thu, 11 Feb 2016 22:56:22 +0000\r\n"
45044504
"MIME-Version: 1.0\r\n"
45054505
"Content-Type: multipart/mixed; boundary=\"mybnd\"\r\n"
4506-
"Subject: format attachment utf8\r\n"
4506+
"Subject: parse attachment utf8\r\n"
45074507
"\r\n"
45084508
"--mybnd\r\n"
45094509
"Content-Type: text/plain; \r\n"

0 commit comments

Comments
 (0)
Please sign in to comment.