diff --git a/src/mail_menu.c b/src/mail_menu.c index 1ea20ff..1fc5a0d 100644 --- a/src/mail_menu.c +++ b/src/mail_menu.c @@ -301,7 +301,12 @@ struct msg_headers *read_message_headers(int msgconf, int msgarea, struct user_r if (jamm->subject == NULL) { jamm->subject = strdup("(No Subject)"); } - + if (jamm->from == NULL) { + jamm->from = strdup("(No Sender)"); + } + if (jamm->to == NULL) { + jamm->to = strdup("(No Recipient)"); + } if (jmh.Attribute & JAM_MSG_PRIVATE) { if (!msg_is_to(user, jamm->to, jamm->daddress, conf.mail_conferences[msgconf]->nettype, conf.mail_conferences[msgconf]->realnames, msgconf) && !msg_is_from(user, jamm->from, jamm->oaddress, conf.mail_conferences[msgconf]->nettype, conf.mail_conferences[msgconf]->realnames, msgconf) && diff --git a/src/www_msgs.c b/src/www_msgs.c index 93dfac6..349c150 100644 --- a/src/www_msgs.c +++ b/src/www_msgs.c @@ -402,6 +402,14 @@ char *www_msgs_messageview(struct user_record *user, int conference, int area, i if (subject == NULL) { subject = strdup("(No Subject)"); } + + if (from == NULL) { + from = strdup("(No Sender)"); + } + + if (to == NULL) { + to = strdup("(No Recipient)"); + } if (jmh.Attribute & JAM_MSG_PRIVATE) { if (!msg_is_to(user, to, daddress, conf.mail_conferences[conference]->nettype, conf.mail_conferences[conference]->realnames, conference) && @@ -485,7 +493,7 @@ char *www_msgs_messageview(struct user_record *user, int conference, int area, i len += strlen(buffer); from_s = www_sanitize(from); - if (conf.mail_conferences[conference]->mail_areas[area]->type != TYPE_LOCAL_AREA) { + if (conf.mail_conferences[conference]->mail_areas[area]->type != TYPE_LOCAL_AREA && oaddress != NULL) { sprintf(buffer, "
From: %s (%s)
\n", from_s, oaddress); } else { sprintf(buffer, "
From: %s
\n", from_s);