Commit 6187df38 authored by ng's avatar ng

fix #265 - be more explicit when aborting resend-cc-encrypted-only

When we are unable to resend to one of the addresses in resend-cc-encrypted-only
we are not sending the email of the batch to any of the addreses.
Adding an additional info makes this more clear and visible to users.
parent 7008bf00
Pipeline #33829 passed with stages
in 14 minutes and 38 seconds
......@@ -24,6 +24,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
* Ensure that GnuPG never asks for a passphrase, even if it wants one. (#448)
* Be more precise about how many keys are in the keyring and how many are usable, when resending (#429)
* Make it more clear what happens when resending an encrypted email fails (due to missing or too many matching keys), but falling back to unencrypted resend is allowed. (#343)
* Be more explicit that resending to other CC recipients has been aborted (#265)
## [3.4.1] / 2019-09-16
......
......@@ -56,6 +56,9 @@ module Schleuder
# Only continue if all recipients are still here.
if recip_map.size < arguments.size
recip_map.keys.each do |aborted_sender|
mail.add_pseudoheader(:error, I18n.t("plugins.resend.aborted", email: aborted_sender))
end
return
end
......@@ -163,15 +166,15 @@ module Schleuder
def self.add_resent_headers(mail, recipients_map, to_or_cc, sent_encrypted)
if sent_encrypted
prefix = I18n.t('plugins.resend.encrypted_to')
str = recipients_map.map do |email, key|
str = "\n" + recipients_map.map do |email, key|
"#{email} (#{key.fingerprint})"
end.join(', ')
end.join(",\n")
else
prefix = I18n.t('plugins.resend.unencrypted_to')
str = recipients_map.keys.join(', ')
str = ' ' + recipients_map.keys.join(", ")
end
headername = resent_header_name(to_or_cc)
mail.add_pseudoheader(headername, "#{prefix} #{str}")
mail.add_pseudoheader(headername, "#{prefix}#{str}")
end
def self.resent_header_name(to_or_cc)
......
......@@ -123,6 +123,7 @@ de:
resend:
not_resent_no_keys: Resending an <%{email}> fehlgeschlagen (%{all_keys} Schlüssel gefunden, davon %{usable_keys} nutzbar. Unverschlüsseltes Senden verboten).
not_resent_encrypted_no_keys: Verschlüsseltes Resending an <%{email}> fehlgeschlagen (%{all_keys} Schlüssel gefunden, davon %{usable_keys} nutzbar).
aborted: Resending an <%{email}> abgebrochen aufgrund anderer Probleme.
encrypted_to: Verschlüsselt an
unencrypted_to: Unverschlüsselt an
invalid_recipient: "Ungültige Emailadresse für resend: %{address}"
......
......@@ -127,6 +127,7 @@ en:
resend:
not_resent_no_keys: Resending to <%{email}> failed (%{all_keys} keys found, of which %{usable_keys} can be used. Unencrypted sending not allowed).
not_resent_encrypted_no_keys: Resending as encrypted email to <%{email}> failed (%{all_keys} keys found, of which %{usable_keys} can be used).
aborted: Resending to <%{email}> aborted due to other errors.
encrypted_to: Encrypted to
unencrypted_to: Unencrypted to
invalid_recipient: "Invalid email-address for resending: %{address}"
......
This diff is collapsed.
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