incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arie...@apache.org
Subject svn commit: r1354750 - /incubator/ooo/trunk/main/shell/source/unix/misc/senddoc.sh
Date Wed, 27 Jun 2012 21:52:15 GMT
Author: arielch
Date: Wed Jun 27 21:52:14 2012
New Revision: 1354750

URL: http://svn.apache.org/viewvc?rev=1354750&view=rev
Log:
i82660 - SimpleCommandMail: fix options passed to Kmail

Modified:
    incubator/ooo/trunk/main/shell/source/unix/misc/senddoc.sh

Modified: incubator/ooo/trunk/main/shell/source/unix/misc/senddoc.sh
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/shell/source/unix/misc/senddoc.sh?rev=1354750&r1=1354749&r2=1354750&view=diff
==============================================================================
--- incubator/ooo/trunk/main/shell/source/unix/misc/senddoc.sh (original)
+++ incubator/ooo/trunk/main/shell/source/unix/misc/senddoc.sh Wed Jun 27 21:52:14 2012
@@ -131,44 +131,53 @@ case `basename "$MAILER" | sed 's/-.*$//
 		run_mozilla "$MAILER" "$COMMAND"
 		;;
 		
-	kmail)
-	
-		while [ "$1" != "" ]; do
-			case $1 in
-				--to)
-					TO="${TO:-}${TO:+,}$2"
-					shift
-					;;
-				--cc)
-					CC="${CC:-}${CC:+,}$2"
-					shift
-					;;
-				--bcc)
-					BCC="${BCC:-}${BCC:+,}$2"
-					shift
-					;;
-				--subject)
-					SUBJECT="$2"
-					shift
-					;;
-				--body)
-					BODY="$2"
-					shift
-					;;
-				--attach)
-					ATTACH="$2"
-					shift
-					;;
-				*)
-					;;
-			esac
-			shift;
-		done
-		
-		${MAILER} --composer ${CC:+--cc} ${CC:+"${CC}"} ${BCC:+--bcc} ${BCC:+"${BCC}"} \
-			${SUBJECT:+--subject} ${SUBJECT:+"${SUBJECT}"} ${BODY:+--body} ${BODY:+"${BODY}"} \
-			${ATTACH:+--attach} ${ATTACH:+"${ATTACH}"} ${TO:+"${TO}"}
-		;;
+    kmail)
+
+        while [ "$1" != "" ]; do
+            case $1 in
+                --to)
+                    TO="${TO:-}${TO:+,}$2"
+                    shift
+                    ;;
+                --cc)
+                    CC="${CC:-}${CC:+,}$2"
+                    shift
+                    ;;
+                --bcc)
+                    BCC="${BCC:-}${BCC:+,}$2"
+                    shift
+                    ;;
+                --subject)
+                    SUBJECT="$2"
+                    shift
+                    ;;
+                --body)
+                    BODY="$2"
+                    shift
+                    ;;
+                --from)
+                    FROM="$2"
+                    shift
+                    ;;
+                --attach)
+                    ATTACH="${ATTACH:-}${ATTACH:+ }--attach "`echo "file://$2" | ${URI_ENCODE}`
+                    shift
+                    ;;
+                *)
+                    ;;
+            esac
+            shift;
+        done
+
+        ${MAILER} --composer \
+            ${CC:+--cc} ${CC:+"${CC}"}  \
+            ${BCC:+--bcc} ${BCC:+"${BCC}"} \
+            ${SUBJECT:+--subject} ${SUBJECT:+"${SUBJECT}"}  \
+            ${BODY:+--body} ${BODY:+"${BODY}"} \
+            ${FROM:+--header} ${FROM:+"From: ${FROM}"} \
+            ${ATTACH:+${ATTACH}}  \
+            ${TO:+"${TO}"}
+        ;;
 		
 	mutt)
 	



Mime
View raw message