when :edit_signature was false, and a non-empty signature file was used,
message bodies didn't end in a newline. for some reason GPG produces
signature output that assumes a trailing newline, even if you don't
have one.
so, now we force one if it ain't there.
["Can't find gpg binary in path."]
end
+ ## here's where we munge rmail output into the format that signed/encrypted
+ ## PGP/GPG messages should be
def format_payload payload
payload.to_s.gsub(/(^|[^\r])\n/, "\\1\r\n").gsub(/^MIME-Version: .*\r\n/, "")
end
m = RMail::Message.new
m.header["Content-Type"] = "text/plain; charset=#{$encoding}"
m.body = @body.join
- m.body = m.body
m.body += sig_lines.join("\n") unless $config[:edit_signature]
+ ## body must end in a newline or GPG signatures will be WRONG!
+ m.body += "\n" unless m.body =~ /\n\Z/
## there are attachments, so wrap body in an attachment of its own
unless @attachments.empty?