Changeset 1527 for pykota/trunk/bin/mailandpopup.sh
- Timestamp:
- 06/07/04 21:10:16 (20 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/bin/mailandpopup.sh
r1257 r1527 14 14 # $Id$ 15 15 # 16 PATH=$PATH:/bin:/usr/bin:/usr/local/bin:/opt/bin 17 # 16 18 # user's name 17 19 UNAME=$1 … … 24 26 # 25 27 # Convert message body to UTF8 for WinPopup 26 UTF8MESSAGE=`echo "$MESSAGE" | /usr/bin/iconv --to-code utf-8 --from-code iso-8859-15`28 UTF8MESSAGE=`echo "$MESSAGE" | iconv --to-code utf-8 --from-code iso-8859-15` 27 29 # 28 30 # Send original message to user 29 /usr/bin/mail -s "Print Quota problem" $RECIPIENT <<EOF131 mail -s "Print Quota problem" $RECIPIENT <<EOF1 30 32 $MESSAGE 31 33 EOF1 32 34 # 33 35 # Send some information to root as well 34 /usr/bin/mail -s "Print Quota problem on printer $PNAME" root <<EOF236 mail -s "Print Quota problem on printer $PNAME" root <<EOF2 35 37 Print Quota problem for user $UNAME 36 38 EOF2 37 39 # 38 40 # Launch WinPopup on user's host (may need a real Samba or NT domain) 39 echo "$UTF8MESSAGE" | /usr/bin/smbclient -M "$UNAME" 2>&1 >/dev/null41 echo "$UTF8MESSAGE" | smbclient -M "$UNAME" 2>&1 >/dev/null