summaryrefslogtreecommitdiff
path: root/ical_reply_sendmail_wrapper.sh
blob: 24a3db445c59d6ea7c9a046bd3748c90e2c3603b (plain)
1
2
3
4
5
6
7
8
9
10
11
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'|