]> code.citadel.org Git - citadel.git/commitdiff
When <R>eply is selected in the message reading loop, the
authorArt Cancro <ajc@citadel.org>
Sat, 24 Mar 2007 04:45:22 +0000 (04:45 +0000)
committerArt Cancro <ajc@citadel.org>
Sat, 24 Mar 2007 04:45:22 +0000 (04:45 +0000)
recipient address is now constructed using the full
Display Name <user@domain.org>  syntax.  This is important because
it allows the auto-populated address book to be more coherent.

citadel/messages.c

index e726f2e1a2410230113d6d1250f1130172564346..b793f335a6525954c1e65535a214849fd2f003eb 100644 (file)
@@ -564,7 +564,12 @@ int read_message(CtdlIPC *ipc,
        /* Set the reply-to address to an Internet e-mail address if possible
         */
        if (message->email != NULL) if (strlen(message->email) > 0) {
-               safestrncpy(reply_to, message->email, sizeof reply_to);
+               if (strlen(message->author) > 0) {
+                       snprintf(reply_to, sizeof reply_to, "%s <%s>", message->author, message->email);
+               }
+               else {
+                       safestrncpy(reply_to, message->email, sizeof reply_to);
+               }
        }
 
        /* But if we can't do that, set it to a Citadel address.