summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2009-09-19 18:56:41 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2009-09-19 18:56:41 +0800
commitb98479ad81628401a1b9069e17ac5658a7108efe (patch)
treefd38a79eac0789ef1cd6315aba17c12e649519f4
parenta9d6026bf93cc34608ecf8582ab1a3252288e80a (diff)
downloadpttbbs-b98479ad81628401a1b9069e17ac5658a7108efe.tar
pttbbs-b98479ad81628401a1b9069e17ac5658a7108efe.tar.gz
pttbbs-b98479ad81628401a1b9069e17ac5658a7108efe.tar.bz2
pttbbs-b98479ad81628401a1b9069e17ac5658a7108efe.tar.lz
pttbbs-b98479ad81628401a1b9069e17ac5658a7108efe.tar.xz
pttbbs-b98479ad81628401a1b9069e17ac5658a7108efe.tar.zst
pttbbs-b98479ad81628401a1b9069e17ac5658a7108efe.zip
* mark auto-forward in mail title because some users just does not understand what they've done.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4862 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/record.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/mbbsd/record.c b/mbbsd/record.c
index bd0f9ab7..8e311bb4 100644
--- a/mbbsd/record.c
+++ b/mbbsd/record.c
@@ -432,6 +432,7 @@ append_record_forward(char *fpath, fileheader_t * record, int size, const char *
for (n = strlen(fpath) - 1; fpath[n] != '/' && n > 0; n--);
if (n + sizeof(".forward") > sizeof(buf))
return -1;
+
memcpy(buf, fpath, n+1);
strcpy(buf + n + 1, ".forward");
if ((fp = fopen(buf, "r"))) {
@@ -460,12 +461,18 @@ append_record_forward(char *fpath, fileheader_t * record, int size, const char *
}
if (buf[0] && buf[0] != ' ' && !flIdiotSent2Self) {
+ char fwd_title[STRLEN] = "";
buf[n + 1] = 0;
strcat(buf, record->filename);
append_record(fpath, record, size);
// because too many user set wrong forward address,
- // let's but them instead.
- bsmtp(buf, record->title, address, origid);
+ // let's put their own address instead.
+ // and again because some really stupid user
+ // does not understand they've set auto-forward,
+ // let's mark this in the title.
+ snprintf(fwd_title, sizeof(fwd_title)-1,
+ "[¦Û°ÊÂà±H] %s", record->title);
+ bsmtp(buf, fwd_title, address, origid);
return 0;
}
}