s4

changeset 694:c45ab714d68e

To: header for email-sender contains all recipients
author HIROSE Yuuji <yuuji@gentei.org>
date Tue, 19 May 2020 11:49:11 +0900
parents 5f3e94a9b7b3
children 5cf0ba49aeab
files s4-funcs.sh
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line diff
     1.1 --- a/s4-funcs.sh	Tue May 19 11:45:02 2020 +0900
     1.2 +++ b/s4-funcs.sh	Tue May 19 11:49:11 2020 +0900
     1.3 @@ -2702,14 +2702,19 @@
     1.4  	)
     1.5        fi
     1.6        rcpts="`email4groupbyuid "$grp" $usel` $fromad$supprcpt"
     1.7 -      rcpts=`echo $rcpts|tr ' ' '\n'|sort|uniq`
     1.8 +      rcpts=`echo $rcpts|tr ' ' '\n'|sort|uniq|tr '\n' ' '`
     1.9        subj="${subj:-$gecos さんからのメッセージ}"
    1.10        REPLYTO=$replyto
    1.11        MAIL_FROM=$mail_from
    1.12        export REPLYTO SMAIL_TO MAIL_FROM
    1.13        err "GrpActionSend: user=[$user], MAIL_FROM=[$mail_from], rcpts=[$rcpts], REPLYTO=[$replyto}"
    1.14        for r in $rcpts; do
    1.15 -	SMAIL_TO="$r $user $fromad"
    1.16 +	if [ x"$user" = x"$r" -o x"$fromad" = x"$r" ]; then
    1.17 +	  SMAIL_TO=$rcpts	# Show all rcpts to sender oneself
    1.18 +	else
    1.19 +	  # Show sender and rcpts address for guest
    1.20 +	  SMAIL_TO=`echo $r $user $fromad|tr ' ' '\n'|sort -u|tr '\n' ' '`
    1.21 +	fi
    1.22  	if [ -n "$afiles" ];then
    1.23  	  ./sendmultipart.sh -t "$r" -s "$subj" -f "$mail_from" $afiles
    1.24  	else