diff options
Diffstat (limited to 'ical_reply_sendmail_wrapper.sh')
-rwxr-xr-x | ical_reply_sendmail_wrapper.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ical_reply_sendmail_wrapper.sh b/ical_reply_sendmail_wrapper.sh new file mode 100755 index 0000000..24a3db4 --- /dev/null +++ b/ical_reply_sendmail_wrapper.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# get $sendmail from mutt +SENDMAIL=`mutt -D|awk -F= '/^sendmail=/{print $2}' | sed -s 's/"//g'` + +# fix header for ical reply and pipe to sendmail +sed '/^Content-Type: text\/calendar;/s/$/; METHOD="REPLY"/'| +sed '/^Content-Disposition: attachment/s/attachment/inline/g'| +$SENDMAIL "$@" + +# this may also be necessary: +#sed '/^Content-Type: multipart\/mixed/s/mixed/alternative/g'| |