diff options
Diffstat (limited to 'mbbsd/mail.c')
-rw-r--r-- | mbbsd/mail.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/mbbsd/mail.c b/mbbsd/mail.c index 2f4ee3e1..b81b1e3a 100644 --- a/mbbsd/mail.c +++ b/mbbsd/mail.c @@ -1908,16 +1908,11 @@ bbs_sendmail(const char *fpath, const char *title, char *receiver) return send_inner_mail(fpath, title, hacker); } /* Running the sendmail */ - if (fpath == NULL) { - snprintf(genbuf, sizeof(genbuf), - "/usr/sbin/sendmail %s > /dev/null", receiver); - fin = fopen("etc/confirm", "r"); - } else { - snprintf(genbuf, sizeof(genbuf), - "/usr/sbin/sendmail -f %s%s %s > /dev/null", - cuser.userid, str_mail_address, receiver); - fin = fopen(fpath, "r"); - } + assert(*fpath); + snprintf(genbuf, sizeof(genbuf), + "/usr/sbin/sendmail -f %s%s %s > /dev/null", + cuser.userid, str_mail_address, receiver); + fin = fopen(fpath, "r"); if (fin == NULL) return -1; fout = popen(genbuf, "w"); |