Commit 68a1bcfb authored by georg's avatar georg

Merge branch '348-pseudoheaders-visual-separation' into 'master'

Add visual separator to the end of the 'pseudoheaders' block

Closes #348

See merge request !305
parents df778898 8a47f70e
Pipeline #32758 passed with stages
in 19 minutes and 47 seconds
......@@ -8,6 +8,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
### Added
* New option for lists to include their public keys in the headers of outgoing emails (conforming with Autocrypt, https://autocrypt.org/). Defaults to true. (#335)
* Add visual separator (78 dashes) to the end of the 'pseudoheaders' block: This should help users of Apple Mail, which jams this block and the body together. Hopefully, this change makes it easier to dinstiguish both parts from each other. (#348)
### Fixed
......
......@@ -334,7 +334,8 @@ module Mail
end
def pseudoheaders(list)
(standard_pseudoheaders(list) + dynamic_pseudoheaders).flatten.join("\n") + "\n"
separator = '------------------------------------------------------------------------------'
(standard_pseudoheaders(list) + dynamic_pseudoheaders).flatten.join("\n") + "\n" + separator + "\n"
end
def add_msgids(list, orig)
......
......@@ -39,7 +39,8 @@ describe Schleuder::Runner do
Schleuder::Runner.new().run(mail, list.email)
message = Mail::TestMailer.deliveries.first
content_part = message.parts.first
pseudoheaders = "From: Nina Siessegger <schleuder@example.org>\nSig: Unsigned"
separator = '------------------------------------------------------------------------------'
pseudoheaders = "From: Nina Siessegger <schleuder@example.org>\nSig: Unsigned\n#{separator}\n"
expect(content_part.parts.first.body).to include(pseudoheaders)
expect(content_part.parts.first.body).not_to include('To:')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment