Commits (1)
  • Rob Swindell's avatar
    Don't repeate mail "comment" headers in exported netmail msgs · a1e12784
    Rob Swindell authored
    smb_getmsgtxt() returns any "comment" headers as part of the message body text, and has since 2003.
    When I added mail->netmail (stored message) export support to SBBSecho v3, I duplicated this logic, so comment headers were added *twice* to exported netmail messages. Oops. I didn't notice until today when playing with forwarding-to-netmail (FTN).
    Also noticed and fixed: any comment headers in posted messages (unlikely/uncommon) would not be exported to EchoMail messages. Use the correct smb_getmsgtxt() mode flags ("NO_TAILS" instead of "BODY_ONLY") - I know, not great names.
......@@ -1262,10 +1262,6 @@ int create_netmail(const char *to, const smbmsg_t* msg, const char *subject, con
fprintf(fp, "\1CHRS: %s\r", charset);
if(msg->editor != NULL)
fprintf(fp, "\1NOTE: %s\r", msg->editor);
/* comment headers are part of text */
for(i=0; i<msg->total_hfields; i++)
if(msg->hfield[i].type == SMB_COMMENT)
fprintf(fp, "%s\r", (char*)msg->hfield_dat[i]);
if(subject != msg->subj)
fprintf(fp, "Subject: %s\r\r", msg->subj);
......@@ -5142,7 +5138,7 @@ bool retoss_bad_echomail(void)
char* body = smb_getmsgtxt(&badsmb, &badmsg, GETMSGTXT_BODY_ONLY);
char* body = smb_getmsgtxt(&badsmb, &badmsg, GETMSGTXT_NO_TAILS);
if(body == NULL) {