diff options
author | victor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-10-08 17:22:41 +0800 |
---|---|---|
committer | victor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-10-08 17:22:41 +0800 |
commit | 540cf4562746b453c858d79b22bf50a0d3657da7 (patch) | |
tree | 4358760cc8363b2fcb8e2c3a70711c915b251963 | |
parent | 13d80a7e50c02922c31cbe436fb2c9174d315db5 (diff) | |
download | pttbbs-540cf4562746b453c858d79b22bf50a0d3657da7.tar pttbbs-540cf4562746b453c858d79b22bf50a0d3657da7.tar.gz pttbbs-540cf4562746b453c858d79b22bf50a0d3657da7.tar.bz2 pttbbs-540cf4562746b453c858d79b22bf50a0d3657da7.tar.lz pttbbs-540cf4562746b453c858d79b22bf50a0d3657da7.tar.xz pttbbs-540cf4562746b453c858d79b22bf50a0d3657da7.tar.zst pttbbs-540cf4562746b453c858d79b22bf50a0d3657da7.zip |
add mail header
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1227 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | mbbsd/mail.c | 15 | ||||
-rw-r--r-- | util/outmail.c | 4 |
2 files changed, 12 insertions, 7 deletions
diff --git a/mbbsd/mail.c b/mbbsd/mail.c index e0dced0f..396beb04 100644 --- a/mbbsd/mail.c +++ b/mbbsd/mail.c @@ -1460,11 +1460,16 @@ bbs_sendmail(char *fpath, char *title, char *receiver) return -1; if (fpath) - fprintf(fout, "Reply-To: %s%s\nFrom: %s%s\n", - cuser.userid, str_mail_address, cuser.userid, - str_mail_address); - fprintf(fout, "To: %s\nSubject: %s\n", receiver, title); - fprintf(fout, "X-Disclaimer: " BBSNAME "對本信內容恕不負責。\n\n"); + fprintf(fout, "Reply-To: %s%s\nFrom: %s <%s%s>\n", + cuser.userid, str_mail_address, + cuser.username, + cuser.userid, str_mail_address); + fprintf(fout,"To: %s\nSubject: %s\n" + "Mime-Version: 1.0\r\n" + "Content-Type: text/plain; charset=\"big5\"\r\n" + "Content-Transfer-Encoding: 8bit\r\n" + "X-Disclaimer: " BBSNAME "對本信內容恕不負責。\n\n", + receiver, title); while (fgets(genbuf, 255, fin)) { if (genbuf[0] == '.' && genbuf[1] == '\n') diff --git a/util/outmail.c b/util/outmail.c index f818d2c6..262c3a67 100644 --- a/util/outmail.c +++ b/util/outmail.c @@ -86,7 +86,7 @@ void doSendBody(int sock, FILE *fp, char *from, char *to, char *subject) { char buf[2048]; n = snprintf(buf, sizeof(buf), - "From: %s\r\n" + "From: %s <%s>\r\n" "To: %s\r\n" "Subject: %s\r\n" "X-Sender: outmail of pttbbs\r\n" @@ -94,7 +94,7 @@ void doSendBody(int sock, FILE *fp, char *from, char *to, char *subject) { "Content-Type: text/plain; charset=\"big5\"\r\n" "Content-Transfer-Encoding: 8bit\r\n" "X-Disclaimer: [" BBSNAME "]對本信內容恕不負責\r\n\r\n", - from, to, subject); + from, from, to, subject); write(sock, buf, n); while(fgets(buf, sizeof(buf), fp)) { |