X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=blobdiff_plain;f=src%2Fcompose.c;h=81947e73394fb78ccceedbcc548c37e2bfda4bd9;hp=8b4e16a1304635b5fc1a0e9fe47a9929ee68eea1;hb=6eb02a559886a1c193524fa4f641bd2e4a799193;hpb=10325e955f8b5a8239fe85a97135800876b1c242 diff --git a/src/compose.c b/src/compose.c index 8b4e16a13..81947e733 100644 --- a/src/compose.c +++ b/src/compose.c @@ -6494,11 +6494,22 @@ static gchar *compose_get_header(Compose *compose) g_string_append_printf(header, "From: %s <%s>\n", qname, from_address); + if (!IS_IN_CUSTOM_HEADER("Disposition-Notification-To") && + compose->return_receipt) { + compose_convert_header(compose, buf, sizeof(buf), from_name, + strlen("Disposition-Notification-To: "), + TRUE); + g_string_append_printf(header, "Disposition-Notification-To: %s <%s>\n", buf, from_address); + } if (qname != name) g_free(qname); - } else + } else { g_string_append_printf(header, "From: %s\n", from_address); - + if (!IS_IN_CUSTOM_HEADER("Disposition-Notification-To") && + compose->return_receipt) + g_string_append_printf(header, "Disposition-Notification-To: %s\n", from_address); + + } g_free(from_name); g_free(from_address); @@ -6654,21 +6665,6 @@ static gchar *compose_get_header(Compose *compose) compose->priority); } - /* Request Return Receipt */ - if (!IS_IN_CUSTOM_HEADER("Disposition-Notification-To")) { - if (compose->return_receipt) { - if (compose->account->name - && *compose->account->name) { - compose_convert_header(compose, buf, sizeof(buf), - compose->account->name, - strlen("Disposition-Notification-To: "), - TRUE); - g_string_append_printf(header, "Disposition-Notification-To: %s <%s>\n", buf, compose->account->address); - } else - g_string_append_printf(header, "Disposition-Notification-To: %s\n", compose->account->address); - } - } - /* get special headers */ for (list = compose->header_list; list; list = list->next) { ComposeHeaderEntry *headerentry;