Skip to content

Commit 411b987

Browse files
committed
proper mime encode wrapping when sending emails with long utf-8 recipient names
1 parent 4e2639a commit 411b987

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/nmail.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.\" DO NOT MODIFY THIS FILE! It was generated by help2man.
2-
.TH NMAIL "1" "May 2025" "nmail 5.4.6" "User Commands"
2+
.TH NMAIL "1" "May 2025" "nmail 5.4.7" "User Commands"
33
.SH NAME
44
nmail \- ncurses mail
55
.SH SYNOPSIS

src/smtp.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ std::string Smtp::GetHeader(const std::string& p_Subject, const std::vector<Cont
262262
const std::vector<Contact>& p_Cc, const std::vector<Contact>& p_Bcc,
263263
const std::string& p_RefMsgId, const Contact& p_From)
264264
{
265-
std::string fromname = MimeEncodeStr(p_From.GetName());
265+
std::string fromname = MimeEncodeWrap(p_From.GetName());
266266
std::string fromaddress = p_From.GetAddress();
267267
struct mailimf_mailbox* mbfrom = mailimf_mailbox_new(strdup(fromname.c_str()),
268268
strdup(fromaddress.c_str()));
@@ -273,7 +273,7 @@ std::string Smtp::GetHeader(const std::string& p_Subject, const std::vector<Cont
273273
for (auto& to : p_To)
274274
{
275275
std::string toname = to.GetName();
276-
std::string tonamemime = MimeEncodeStr(toname);
276+
std::string tonamemime = MimeEncodeWrap(toname);
277277
std::string toaddr = to.GetAddress();
278278
struct mailimf_mailbox* mbto = mailimf_mailbox_new(toname.empty()
279279
? NULL : strdup(tonamemime.c_str()),
@@ -291,7 +291,7 @@ std::string Smtp::GetHeader(const std::string& p_Subject, const std::vector<Cont
291291
for (auto& cc : p_Cc)
292292
{
293293
std::string ccname = cc.GetName();
294-
std::string ccnamemime = MimeEncodeStr(ccname);
294+
std::string ccnamemime = MimeEncodeWrap(ccname);
295295
std::string ccaddr = cc.GetAddress();
296296
struct mailimf_mailbox* mbcc = mailimf_mailbox_new(ccname.empty()
297297
? NULL : strdup(ccnamemime.c_str()),
@@ -309,7 +309,7 @@ std::string Smtp::GetHeader(const std::string& p_Subject, const std::vector<Cont
309309
clist* bcclist = clist_new();
310310
for (auto& bcc : p_Bcc)
311311
{
312-
std::string bccname = MimeEncodeStr(bcc.GetName());
312+
std::string bccname = MimeEncodeWrap(bcc.GetName());
313313
std::string bccaddr = bcc.GetAddress();
314314
struct mailimf_mailbox* mbbcc = mailimf_mailbox_new(strdup(bccname.c_str()),
315315
strdup(bccaddr.c_str()));

src/version.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
#include "version.h"
99

10-
#define NMAIL_VERSION "5.4.6"
10+
#define NMAIL_VERSION "5.4.7"
1111

1212
std::string Version::GetBuildOs()
1313
{

0 commit comments

Comments
 (0)