From 2b86f8cab25cdf83f9b7c6d9a1fc7c692e520492 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Fri, 2 Dec 2011 08:36:08 +0000 Subject: [PATCH] Handle non-multipart email --- script/deliver-message | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/script/deliver-message b/script/deliver-message index 7b5f60e01..b6c679b0a 100755 --- a/script/deliver-message +++ b/script/deliver-message @@ -19,7 +19,12 @@ end exit 0 unless recipient[3] == digest[0,6] mail = Mail.new(STDIN.readlines.join) -body = mail.html_part || mail.text_part + +if mail.multipart? + body = mail.html_part || mail.text_part +else + body = mail.body +end message = Message.new(:sender => from, :recipient => to, :sent_on => mail.date.new_offset(0), -- 2.39.5