From: Wilfried Goesgens Date: Mon, 4 Oct 2010 22:41:35 +0000 (+0200) Subject: * check whether we need to QP-Encode our from in case of umlauts or so in the users... X-Git-Tag: v7.86~46 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=40b6668443c5ee115e54726c246aaf065ddb46bf * check whether we need to QP-Encode our from in case of umlauts or so in the users realname. --- diff --git a/citadel/msgbase.c b/citadel/msgbase.c index 6efe6543e..be2096d1d 100644 --- a/citadel/msgbase.c +++ b/citadel/msgbase.c @@ -3436,6 +3436,8 @@ struct CtdlMessage *CtdlMakeMessage( char dest_node[256]; char buf[1024]; struct CtdlMessage *msg; + StrBuf *FakeAuthor; + StrBuf *FakeEncAuthor = NULL; msg = malloc(sizeof(struct CtdlMessage)); memset(msg, 0, sizeof(struct CtdlMessage)); @@ -3465,11 +3467,13 @@ struct CtdlMessage *CtdlMakeMessage( msg->cm_fields['T'] = strdup(buf); if ((fake_name != NULL) && (fake_name[0])) { /* author */ - msg->cm_fields['A'] = strdup(fake_name); + FakeAuthor = NewStrBufPlain (fake_name, -1); } else { - msg->cm_fields['A'] = strdup(author->fullname); + FakeAuthor = NewStrBufPlain (author->fullname, -1); } + StrBufRFC2047encode(&FakeEncAuthor, FakeAuthor); + msg->cm_fields['A'] = SmashStrBuf(&FakeEncAuthor); if (CC->room.QRflags & QR_MAILBOX) { /* room */ msg->cm_fields['O'] = strdup(&CC->room.QRname[11]);