If you use multible mailboxes, the correct one is
now used for Bcc-messages.
static char *tmpfil;
static char *subject = NULL; /* the subject field for BCC'ing */
static char *tmpfil;
static char *subject = NULL; /* the subject field for BCC'ing */
+static struct mailname *from = NULL; /* the from field for BCC'ing */
static char fccs[BUFSIZ] = "";
struct mailname *bccs = NULL; /* list of the bcc recipients */
struct mailname *recipients = NULL; /* list of the recipients */
static char fccs[BUFSIZ] = "";
struct mailname *bccs = NULL; /* list of the bcc recipients */
struct mailname *recipients = NULL; /* list of the recipients */
/* needed because the address parser holds global state */
ismymbox(NULL);
/* needed because the address parser holds global state */
ismymbox(NULL);
- for ( mp = addr_start.m_next; mp; mp = mp->m_next) {
+ for (mp = addr_start.m_next; mp; mp = mp->m_next) {
if (ismymbox(mp)) {
msgflags |= MFMM;
if (my == NULL) {
if (ismymbox(mp)) {
msgflags |= MFMM;
if (my == NULL) {
for (mp=bccs; mp; mp=mp->m_next) {
bccdraft = getcpy(m_mktemp2("/tmp/", invo_name, NULL, &out));
fprintf(out, "To: %s\n", mp->m_text);
for (mp=bccs; mp; mp=mp->m_next) {
bccdraft = getcpy(m_mktemp2("/tmp/", invo_name, NULL, &out));
fprintf(out, "To: %s\n", mp->m_text);
+ if (from) {
+ fprintf(out, "From: %s\n", from->m_text);
+ }
fprintf(out, "Subject: [BCC] %s", subject ? subject : "");
fprintf(out, "%s: %s\n", attach_hdr, origmsg);
fprintf(out, "------------\n");
fprintf(out, "Subject: [BCC] %s", subject ? subject : "");
fprintf(out, "%s: %s\n", attach_hdr, origmsg);
fprintf(out, "------------\n");