diff options
author | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-01-16 22:47:43 +0800 |
---|---|---|
committer | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-01-16 22:47:43 +0800 |
commit | 7b69fb1425d9df300a72b2eff743e3fbe447ea04 (patch) | |
tree | 11371fb995d27423c118518f9a11d2222a8fc9a2 /mbbsd | |
parent | 798578d4ab39420b79318eb2a274f8aecb558bf5 (diff) | |
download | pttbbs-7b69fb1425d9df300a72b2eff743e3fbe447ea04.tar pttbbs-7b69fb1425d9df300a72b2eff743e3fbe447ea04.tar.gz pttbbs-7b69fb1425d9df300a72b2eff743e3fbe447ea04.tar.bz2 pttbbs-7b69fb1425d9df300a72b2eff743e3fbe447ea04.tar.lz pttbbs-7b69fb1425d9df300a72b2eff743e3fbe447ea04.tar.xz pttbbs-7b69fb1425d9df300a72b2eff743e3fbe447ea04.tar.zst pttbbs-7b69fb1425d9df300a72b2eff743e3fbe447ea04.zip |
clean up
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@613 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/mail.c | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/mbbsd/mail.c b/mbbsd/mail.c index 8fafa0c1..7f145867 100644 --- a/mbbsd/mail.c +++ b/mbbsd/mail.c @@ -1,4 +1,4 @@ -/* $Id: mail.c,v 1.23 2002/10/29 12:53:42 in2 Exp $ */ +/* $Id: mail.c,v 1.24 2003/01/16 14:47:43 kcwu Exp $ */ #include "bbs.h" char currmaildir[32]; static char msg_cc[] = "\033[32m[¸s²Õ¦W³æ]\033[m\n"; @@ -1426,19 +1426,12 @@ send_inner_mail(char *fpath, char *title, char *receiver) static int bbs_sendmail(char *fpath, char *title, char *receiver) { - static int configured = 0; - static char myhostname[STRLEN]; - static char myusername[20]; - struct hostent *hbuf; - struct passwd *pbuf; char *ptr; char genbuf[256]; FILE *fin, *fout; /* ¤¤³~ÄdºI */ if ((ptr = strchr(receiver, ';'))) { - struct tm *ptime; - *ptr = '\0'; } if ((ptr = strstr(receiver, str_mail_address)) || !strchr(receiver, '@')) { @@ -1453,22 +1446,6 @@ bbs_sendmail(char *fpath, char *title, char *receiver) strlcpy(hacker, receiver, sizeof(hacker)); return send_inner_mail(fpath, title, hacker); } - /* setup the hostname and username */ - if (!configured) { - /* get host name */ - hbuf = gethostbyname("localhost"); - if (hbuf) - strncpy(myhostname, hbuf->h_name, STRLEN); - - /* get bbs uident */ - pbuf = getpwuid(getuid()); - if (pbuf) - strncpy(myusername, pbuf->pw_name, 20); - if (hbuf && pbuf) - configured = 1; - else - return -1; - } /* Running the sendmail */ if (fpath == NULL) { snprintf(genbuf, sizeof(genbuf), |