1 #!/bin/sh 2 attach_cmds="" 3 while [ $# -gt 0 ]; do 4 fullpath=$(readlink --canonicalize "$1") 5 attach_cmds="$attach_cmds (mml-attach-file \"$fullpath\")" 6 shift 7 done 8 emacsclient -a '' -c -e "(progn (compose-mail) $attach_cmds)"