mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 04:03:57 -06:00
Fix message, and add test, for EmailUnparseableError
This commit is contained in:
parent
73ceeda1f9
commit
1682f5d584
@ -1372,14 +1372,15 @@ en:
|
||||
text_body_template: |
|
||||
We're sorry, but your email message to %{destination} didn't work.
|
||||
|
||||
We couldn't find any content in the email.
|
||||
We couldn't find any content in the email. Make sure that you wrote something at the top of the email - we can't parse inline replies.
|
||||
If you're getting this and you did include content, try again in UTF-8 plain text (no HTML).
|
||||
|
||||
email_reject_parsing:
|
||||
subject_template: "Email issue -- Content unrecognized"
|
||||
text_body_template: |
|
||||
We're sorry, but your email message to %{destination} didn't work.
|
||||
|
||||
The email encoding was unknown or not supported. Try again with UTF-8 plain text.
|
||||
We couldn't find where your reply was in the email. **Make sure to write your entire reply at the top of the email** -- everything below the start of the replied-to message is discarded.
|
||||
|
||||
email_reject_post_error:
|
||||
subject_template: "Email issue -- Posting error"
|
||||
|
@ -19,8 +19,8 @@ describe Email::Receiver do
|
||||
expect { Email::Receiver.new("asdf" * 30).process}.to raise_error(Email::Receiver::EmptyEmailError)
|
||||
end
|
||||
|
||||
pending "raises EmailUnparsableError in some situation" do
|
||||
expect { Email::Receiver.new("something").process}.to raise_error(Email::Receiver::EmailUnparsableError)
|
||||
it "raises EmailUnparsableError if there is no reply content" do
|
||||
expect { Email::Receiver.new(fixture_file("emails/no_content_reply.eml")).process}.to raise_error(Email::Receiver::EmailUnparsableError)
|
||||
end
|
||||
end
|
||||
|
||||
|
34
spec/fixtures/emails/no_content_reply.eml
vendored
Normal file
34
spec/fixtures/emails/no_content_reply.eml
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
Return-Path: <jake@adventuretime.ooo>
|
||||
Received: from iceking.adventuretime.ooo ([unix socket]) by iceking (Cyrus v2.2.13-Debian-2.2.13-19+squeeze3) with LMTPA; Thu, 13 Jun 2013 17:03:50 -0400
|
||||
Received: from mail-ie0-x234.google.com (mail-ie0-x234.google.com [IPv6:2607:f8b0:4001:c03::234]) by iceking.adventuretime.ooo (8.14.3/8.14.3/Debian-9.4) with ESMTP id r5DL3nFJ016967 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for <reply+59d8df8370b7e95c5a49fbf86aeb2c93@appmail.adventuretime.ooo>; Thu, 13 Jun 2013 17:03:50 -0400
|
||||
Received: by mail-ie0-f180.google.com with SMTP id f4so21977375iea.25 for <reply+59d8df8370b7e95c5a49fbf86aeb2c93@appmail.adventuretime.ooo>; Thu, 13 Jun 2013 14:03:48 -0700
|
||||
Received: by 10.0.0.1 with HTTP; Thu, 13 Jun 2013 14:03:48 -0700
|
||||
Date: Thu, 13 Jun 2013 17:03:48 -0400
|
||||
From: Jake the Dog <jake@adventuretime.ooo>
|
||||
To: reply+59d8df8370b7e95c5a49fbf86aeb2c93@appmail.adventuretime.ooo
|
||||
Message-ID: <CADkmRc+rNGAGGbV2iE5p918UVy4UyJqVcXRO2=otppgzduJSg@mail.gmail.com>
|
||||
Subject: re: [Discourse Meta] eviltrout posted in 'Adventure Time Sux'
|
||||
Mime-Version: 1.0
|
||||
Content-Type: text/plain;
|
||||
charset=ISO-8859-1
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Sieve: CMU Sieve 2.2
|
||||
X-Received: by 10.0.0.1 with SMTP id n7mr11234144ipb.85.1371157428600; Thu,
|
||||
13 Jun 2013 14:03:48 -0700 (PDT)
|
||||
X-Scanned-By: MIMEDefang 2.69 on IPv6:2001:470:1d:165::1
|
||||
|
||||
On Sun, Jun 9, 2013 at 1:39 PM, eviltrout via Discourse Meta
|
||||
<reply+59d8df8370b7e95c5a49fbf86aeb2c93@appmail.adventuretime.ooo> wrote:
|
||||
>
|
||||
>
|
||||
>
|
||||
> eviltrout posted in 'Adventure Time Sux' on Discourse Meta:
|
||||
>
|
||||
> ---
|
||||
> hey guys everyone knows adventure time sucks!
|
||||
>
|
||||
> ---
|
||||
> Please visit this link to respond: http://localhost:3000/t/adventure-time-sux/1234/3
|
||||
>
|
||||
> To unsubscribe from these emails, visit your [user preferences](http://localhost:3000/user_preferences).
|
||||
>
|
Loading…
Reference in New Issue
Block a user