]> code.citadel.org Git - citadel.git/blobdiff - citadel/modules/smtp/smtp_util.c
Fix generation of bounce messages; we would put the bounce body into the author field.
[citadel.git] / citadel / modules / smtp / smtp_util.c
index 589f8855305f4eb889d087a745e598d10cfba435..1c57d99595de161d134ac06a597fe3b5ac30c4a5 100644 (file)
@@ -94,7 +94,7 @@ const char *smtp_get_Recipients(void)
 
        if (sSMTP == NULL)
                return NULL;
-       else return sSMTP->from;
+       else return ChrPtr(sSMTP->from);
 }
 
 
@@ -286,9 +286,9 @@ void smtp_do_bounce(char *instr, StrBuf *OMsgTxt)
        StrBufAppendBufPlain(BounceMB, HKEY("--"), 0);
        StrBufAppendBuf(BounceMB, boundary, 0);
        StrBufAppendBufPlain(BounceMB, HKEY("--\r\n"), 0);
-       if (bmsg->cm_fields['A'] != NULL)
-               free(bmsg->cm_fields['A']);
-       bmsg->cm_fields['A'] = SmashStrBuf(&BounceMB);
+       if (bmsg->cm_fields['M'] != NULL)
+               free(bmsg->cm_fields['M']);
+       bmsg->cm_fields['M'] = SmashStrBuf(&BounceMB);
        /* Deliver the bounce if there's anything worth mentioning */
        syslog(LOG_DEBUG, "num_bounces = %d\n", num_bounces);
        if (num_bounces > 0) {