It is better to specify the attachment via its full path, because if
the attachment markup is copied to another buffer, the relative path
may not be valid there.
#!/bin/sh
attach_cmds=""
while [ "$1" ]; do
#!/bin/sh
attach_cmds=""
while [ "$1" ]; do
- attach_cmds="$attach_cmds (mml-attach-file \"$1\")"
+ fullpath=$(readlink --canonicalize $1)
+ attach_cmds="$attach_cmds (mml-attach-file \"$fullpath\")"
shift
done
emacsclient -a '' -c -e "(progn (compose-mail) $attach_cmds)"
shift
done
emacsclient -a '' -c -e "(progn (compose-mail) $attach_cmds)"