Improved subject in oversized mail template.

This commit is contained in:
Martin Edenhofer 2019-08-09 12:47:21 +02:00
parent 77d0b2d5c9
commit b7bcc2aeff
5 changed files with 6 additions and 6 deletions

View file

@ -812,7 +812,7 @@ process unprocessable_mails (tmp/unprocessable_mail/*.eml) again
end
# Auto reply as the postmaster to oversized emails with:
# [ALERT] Message too large
# [undeliverable] Message too large
def postmaster_response(channel, msg)
begin
reply_mail = compose_postmaster_reply(msg)

View file

@ -1,4 +1,4 @@
[ALERT] Message too large
[undeliverable] Message too large
Dear #{mail.from_display_name},
Unfortunately your email titled "#{mail.subject}" could not be delivered to one or more recipients.

View file

@ -16,7 +16,7 @@ RSpec.describe NotificationFactory::Mailer do
mail
end
let(:en_expected_subject) { '[ALERT] Message too large' }
let(:en_expected_subject) { '[undeliverable] Message too large' }
let(:en_expected_body) do
<<~BODY

View file

@ -1014,7 +1014,7 @@ RSpec.describe Channel::EmailParser, type: :model do
context 'for English locale (en)' do
include_examples 'postmaster reply' do
let(:locale) { 'en' }
let(:expected_subject) { '[ALERT] Message too large' }
let(:expected_subject) { '[undeliverable] Message too large' }
let(:expected_body) do
body = <<~BODY
Dear Smith Sepp,
@ -1074,7 +1074,7 @@ RSpec.describe Channel::EmailParser, type: :model do
context 'for English locale (en)' do
include_examples 'postmaster reply' do
let(:locale) { 'en' }
let(:expected_subject) { '[ALERT] Message too large' }
let(:expected_subject) { '[undeliverable] Message too large' }
let(:expected_body) do
body = <<~BODY
Dear Smith Sepp,

View file

@ -129,7 +129,7 @@ Oversized Email Message Body #{'#' * 120_000}
parser = Channel::EmailParser.new
mail = parser.parse(msg)
assert_equal(mail[:from_email], @email_address.email)
assert_equal(mail[:subject], '[ALERT] Message too large')
assert_equal(mail[:subject], '[undeliverable] Message too large')
assert_equal("<#{@test_id}@zammad.test.com>",
mail['references'],
'Reply\'s Referecnes header must match the send message ID')