# HG changeset patch # User HIROSE Yuuji # Date 1589205791 -32400 # Node ID 14a7c23f3f06ee12f2c890ea76e8ab0215b1fcac # Parent 347ea2bca68749a6715a6e15fb4d49bee7acd963 Allow supplemental rcpt address and file attachment in DM in grpAction diff -r 347ea2bca687 -r 14a7c23f3f06 s4-funcs.sh --- a/s4-funcs.sh Mon May 11 23:01:19 2020 +0900 +++ b/s4-funcs.sh Mon May 11 23:03:11 2020 +0900 @@ -2662,11 +2662,27 @@ checkdomain "$a" && supprcpt="$supprcpt $a" done fi + ## Start parse of attachment files + if [ -n `getpar attach` ]; then + afiles="" + for fn in `query "SELECT DISTINCT val FROM par WHERE var='files';"` + do + f=$tmpd/$fn + if [ -s $f ]; then + afiles=$afiles"${afiles:+ }$f" + fi + done + fi ## SENDER=$noreply \ # Should not SENDER be set to $noreply?? - REPLYTO=$replyto \ - MAIL_FROM=$mail_from \ - smail "`email4groupbyuid "$grp" $usel` $user$supprcpt" \ - "$gecos さんからのメッセージ" <差出人を自分に(チェックを外すと相手が返事できない)
-`cgi_text supprcpt`(下記一覧の1人以上選択しないと無効) +`cgi_text supprcpt`[実験中](下記一覧の1人以上選択しないと無効)
`cgi_textarea text "" cols=40`
+ + +`cgi_file files "" multiple`[実験中] ${isowner:+$cmmsg$excmsg} `cgi_radio rm close id="x"` diff -r 347ea2bca687 -r 14a7c23f3f06 sendmultipart.sh --- a/sendmultipart.sh Mon May 11 23:01:19 2020 +0900 +++ b/sendmultipart.sh Mon May 11 23:03:11 2020 +0900 @@ -1,9 +1,10 @@ #!/bin/sh +# 愛 # send multipart message via email # (C)2012,2015 by HIROSE Yuuji [yuuji(at)yatex.org] # You can obtain the latest version of this script from: # http://www.gentei.org/~yuuji/software/sendmultipart.sh -# Last modified Sat May 9 13:09:42 2020 on firestorm +# Last modified Mon May 11 21:42:39 2020 on firestorm # # Typical usage: # echo "Hi, here's photo I've taken. Enjoy" | \ @@ -38,7 +39,9 @@ boundary=\"$boundary\"" textcharset=iso-2022-jp rcpts="" -rcptscomma="" +nl=" +" +rcptheader="" [ -f $conf ] && . $conf # read rc file @@ -46,9 +49,9 @@ case "$1" in -t) shift; rcpts="$rcpts${rcpts:+ }`echo $1|tr , ' '`" - rcptscomma="$rcptscomma${rcptscomma:+, }$1" ;; -s) shift; subject="`echo $1|nkf -M`" ;; + -r) shift; REPLYTO="$1" ;; -f) shift; from="From: $1" ;; -v) verbose=1 ;; -h) usage ;; # -h helpオプション @@ -57,6 +60,7 @@ esac shift done +rcptheader=`echo $rcpts|tr ' ' '\n'|sort -u|sed 's/^/To: /g'` plainheader="Content-Type: text/plain; charset=$textcharset Content-Transfer-Encoding: 7bit" @@ -89,8 +93,8 @@ # Generate contents ( cat<