Permalink
Browse files

Inlining attachment in the header

To make Lotus Notes happy. see www.dreckstool.de
  • Loading branch information...
1 parent 56a9996 commit ceb651e458957405c57b184ea75eaa638067aa0d Martin Sander committed Oct 1, 2009
Showing with 8 additions and 3 deletions.
  1. +6 −1 ical_reply_sendmail_wrapper.sh
  2. +2 −2 mutt-ical.py
@@ -4,4 +4,9 @@
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"/' | $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'|
View
@@ -79,9 +79,9 @@ def get_mutt_command(ical, email_address, accept_decline, icsfile):
accept_decline = accept_decline.capitalize()
sender = ical.vevent.contents['organizer'][0].value.split(':')[1].encode()
summary = ical.vevent.contents['summary'][0].value.encode()
- command = ["mutt", sender, "-a", icsfile,
+ command = ["mutt", "-a", icsfile,
"-e", 'set sendmail=\'ical_reply_sendmail_wrapper.sh\'',
- "-s", "'%s: %s'" % (accept_decline, summary)]
+ "-s", "'%s: %s'" % (accept_decline, summary), "--", sender]
return command
def execute(command, mailtext):

0 comments on commit ceb651e

Please sign in to comment.