Commit Graph

297 Commits

Author SHA1 Message Date
scossar
a1d08cad6a use default font 2016-01-18 16:41:52 -08:00
Régis Hanol
3083657358 FEATURE: better email in support
FEATURE: new incoming_email model
FEATURE: infinite scrolling in emails admin
FEATURE: new 'emails:import' rake task
2016-01-19 00:57:55 +01:00
scossar
0c4e28cd0b pad link with border 2016-01-18 14:06:35 -08:00
Régis Hanol
cf0558cd33 FEATURE: properly style whisper email notifications 2016-01-11 17:47:17 +01:00
Jeff Atwood
006bb06371 make first email footer link specially highlighted 2016-01-08 02:14:58 -08:00
James Kiesel
6ceb108946 Add specs for post action guardian 2015-12-30 20:52:36 +01:00
James Kiesel
a559754db3 Add post action creator 2015-12-30 20:04:05 +01:00
James Kiesel
86da47880a Allow +1 via email 2015-12-30 12:17:45 +01:00
Régis Hanol
3e923c7a41 FIX: ensure inactive users can't email in 2015-12-21 17:54:02 +01:00
Régis Hanol
ca529a673a just use the address instead of building it ourselves 2015-12-18 17:54:42 +01:00
Régis Hanol
4bb31daa2e FIX: when getting a reply by email, ensure it's by the same user 2015-12-16 00:43:05 +01:00
Robin Ward
ccf5b1584d Unsubscribe link needn't be sanitized 2015-12-11 10:06:25 -05:00
Régis Hanol
02279c41cb Merge pull request #3918 from techAPJ/better-email-parsing
FEATURE: better email reply parsing
2015-12-11 14:51:24 +01:00
Robin Ward
df19a27753 FIX: Don't sanitize header_instructions 2015-12-10 18:15:32 -05:00
Régis Hanol
323e3cee22 when creating a staged account, use the display name provided in the email 2015-12-10 23:52:20 +01:00
Régis Hanol
93d1cc6294 add support for incoming emails in CC/BCC fields 2015-12-10 23:49:16 +01:00
Arpit Jalan
553248de86 FEATURE: new gem discourse_email_parser 2015-12-11 01:02:28 +05:30
Arpit Jalan
7a8e5a50ff FEATURE: better email reply parsing 2015-12-09 23:47:01 +05:30
Robin Ward
b781b6aea3 Add header_instructions overridable translation for email headers. 2015-12-07 16:52:33 -05:00
Régis Hanol
1cde276656 FEATURE: ability to send emails to a group 2015-12-07 17:01:08 +01:00
Régis Hanol
dd28a3c63a add support for inline images in emails in 2015-11-30 18:33:24 +01:00
Régis Hanol
0d54c18c8b new hidden 'allow_staged_accounts' setting 2015-11-26 18:31:23 +01:00
Robin Ward
2196160549 FIX: Allow emails to begin with a quote (but skip it!) 2015-11-18 15:23:10 -05:00
Régis Hanol
e2121c2c2c FIX: add 'max-width' to images with auto width/height in emails 2015-11-04 12:38:39 +01:00
Robin Ward
2fdf8cba3d FIX: Support formatted > quotes in emails 2015-10-22 16:08:52 -04:00
Régis Hanol
6c29781687 FIX: this is making oneboxed images way too big (reverts 121426287) 2015-10-22 19:46:48 +02:00
Régis Hanol
515fc49727 FIX: replace polls with a link in emails 2015-10-22 19:10:07 +02:00
Arpit Jalan
1821ba8d93 optimize string replacment 2015-10-21 13:44:59 +05:30
Arpit Jalan
897563a309 FIX: List-ID should not contain space 2015-10-21 00:00:06 +05:30
Régis Hanol
e43034f08f Revert "FEATURE: SVG letter avatars (based on @eviltrout's spike)"
This reverts commit cd77465788.
2015-09-11 00:23:52 +02:00
Régis Hanol
cd77465788 FEATURE: SVG letter avatars (based on @eviltrout's spike) 2015-09-11 00:11:48 +02:00
Sam
27b1ec2917 FIX: incorrect emoji stripping logic 2015-08-19 09:12:08 +10:00
Régis Hanol
6669a2d94d FEATURE: per-topic unsubscribe option in emails 2015-08-12 23:00:16 +02:00
Robin Ward
33a5fce124 Importer for mbox format 2015-07-23 18:37:40 -04:00
Robin Ward
ab50d039bb Importer for nabble 2015-05-22 15:41:26 -04:00
Robin Ward
2cbcd15789 FIX: Post Mannager wasn't being used for email replies 2015-04-28 13:04:34 -04:00
Régis Hanol
10270593a4 FIX: remove links in poll email notification 2015-04-26 00:37:27 +02:00
Jeff Atwood
7d5b5533c4 smaller popular post top margins in digest 2015-04-25 00:54:22 -07:00
Robin Ward
4aa2039238 Add full name in emails, tweak styles a bit. 2015-03-24 11:25:47 -04:00
Robin Ward
8513045381 Include user title in email notifications 2015-03-23 14:12:11 -04:00
Arpit Jalan
228d3240eb FIX: convert all emojis to text in short email notifications 2015-02-26 21:16:01 +05:30
Régis Hanol
13e5c02643 FIX: convert all emojis to text in short email notifications 2015-02-26 12:50:56 +01:00
Arpit Jalan
f3daae6dec Improve auto generated email reply error message 2015-02-18 18:58:51 +05:30
Régis Hanol
f7d2fc0524 FEATURE: 'reply by email address' validator
Prevent infinite email loophole when the 'reply_by_email_address' site setting is the same as the 'notification_email'.
2015-02-06 12:08:37 +01:00
Régis Hanol
0e5c9b2590 small upload code refactor 2015-02-03 18:44:18 +01:00
Arpit Jalan
e97755ab5d FIX: remove custom Discourse headers in email 2015-01-29 17:25:50 +05:30
Arpit Jalan
b0369061e2 FIX: always set a default Message ID in email 2015-01-28 14:49:38 +05:30
Arpit Jalan
5287669116 💄 simplify utf-8 conversion 2015-01-19 15:21:39 +05:30
Arpit Jalan
fad9ca7b36 FIX: convert UTF8 charset to UTF-8 2015-01-19 10:09:17 +05:30
Jeff Atwood
db5f2ae88c Fix relative URLs in plain text emails 2015-01-17 02:08:03 -08:00
Régis Hanol
45dbdb6896 FEATURE: custom emojis 2014-12-23 01:12:26 +01:00
Arpit Jalan
d28515792a FIX: auto response email replies should not be accepted 2014-12-04 22:39:13 +05:30
Arpit Jalan
529014d56e FEATURE: switch to GitHub email_reply_parser library and parse plain text email content 2014-12-01 09:00:35 +05:30
Jeff Atwood
cb9507d292 tighten up title line height in digest email 2014-11-28 11:45:03 -08:00
Jeff Atwood
a85a3da167 move digest email featured post category underneath 2014-11-28 00:38:08 -08:00
Jeff Atwood
f918d3e89b FEATURE: add Message-ID header to emails
when topic present for email of course
2014-11-26 16:36:02 -08:00
Jeff Atwood
034942ac5f let's go with original iPhone dimensions 2014-11-14 17:33:42 -08:00
Jeff Atwood
5b737830af improved email scale img 2014-11-14 17:28:41 -08:00
Jeff Atwood
855305b0f6 only auto scale email img if both dims large 2014-11-14 16:23:52 -08:00
Jeff Atwood
006c93b435 bump up digest footer font size 2014-11-14 00:48:45 -08:00
Jeff Atwood
64140c5fe0 digest email style tweak 2014-11-13 13:44:53 -08:00
Jeff Atwood
36d094856c normalize footer div on all emails 2014-11-11 23:19:15 -08:00
Sam
1a775aa784 Merge pull request #2784 from chancancode/upgrade-to-rails-master-4-2
[WIP] Upgrade to rails master/4.2
2014-11-11 09:46:02 +11:00
Robin Ward
c89064f7c0 Merge pull request #2901 from JKillian/patch-1
Add additional fields that indicate reply
2014-11-10 15:44:14 -05:00
Godfrey Chan
b1a0cd417d Avoid a deprecation warning by poly-filling #deliver_now and #deliver_now 2014-11-10 01:05:46 -08:00
Jeff Atwood
435cd37021 copyedits; email image auto for > 250 width/height 2014-11-09 01:27:09 -08:00
Jeff Atwood
e669fed8ea increase auto email img width threshold to 50px 2014-11-07 14:34:15 -08:00
Robin Ward
872cfff49b FIX: Shouldn't overwrite styles in emails that we explicitly set, like category
colors.
2014-11-07 16:42:57 -05:00
Robin Ward
5defaca197 FIX: Don't use auto sizes for very small images (emoticons) 2014-11-07 16:09:16 -05:00
Arpit Jalan
f735709853 optimize detecting avatar image logic 2014-10-29 02:14:24 +05:30
Arpit Jalan
57fbe4defb FIX: letter avatars were not getting stripped from short emails 2014-10-29 01:36:08 +05:30
Sam
3a11e5b52e Merge pull request #2921 from techAPJ/patch-1
FIX: email replies should not be accepted for deleted topics
2014-10-28 14:11:33 +11:00
Arpit Jalan
370f50250b FIX: attachment links in mail lacks protocol 2014-10-28 00:08:51 +05:30
Arpit Jalan
b37d845dd3 FIX: email replies should not be accepted for deleted topics 2014-10-27 13:05:33 +05:30
Arpit Jalan
08dc0e6ee6 FIX: email replies to closed topic should not be accepted 2014-10-25 23:47:13 +05:30
Arpit Jalan
7a1731ce0e emails from microsoft outlook 14 were not getting parsed as text 2014-10-24 11:45:17 +05:30
Jeff Atwood
f959bf7d93 make sure categories don't wrap in email digests 2014-10-23 10:53:31 -07:00
Jeff Atwood
0041081c6e fix size of quote avatars in email 2014-10-23 09:00:21 -07:00
JKillian
d872d0f78a Add additional fields that indicate reply
When scanning for where a reply starts, three lines in a row matching common email reply headers indicate the start of a reply. Add 'Cc', 'Bcc', and 'Date' because these are also common.
2014-10-22 15:22:04 -04:00
Jeff Atwood
121426287a yet another attempt at images in email 2014-10-21 12:53:18 -07:00
Jeff Atwood
d2fb2bc4cd another approach on mobile email images 2014-10-20 10:38:21 -07:00
Jeff Atwood
ab91120547 mobile emails, use 100% / auto img sizing 2014-10-19 22:52:47 -07:00
Arpit Jalan
2131a37811 FEATURE: show raw email for replies/topics created via email 2014-10-17 22:22:19 +05:30
Jeff Atwood
9822dcf137 we don't want a max-width on html email tables 2014-10-14 16:56:43 -07:00
Arpit Jalan
24a0db3244 FIX: fix email replies for ms outlook 2014-10-14 16:20:35 +05:30
Arpit Jalan
47d48b4dd8 FEATURE: add Precedence header 2014-10-09 01:40:48 +05:30
Robin Ward
0c739bb5b6 Merge pull request #2860 from techAPJ/patch-2
include category in List-Id instead of topic
2014-10-08 15:28:41 -04:00
Arpit Jalan
c53f635b2c include category in List-Id instead of topic 2014-10-09 00:34:27 +05:30
Arpit Jalan
b457005b07 FIX: handle multiple paragraphs in email reply when parsing html 2014-10-08 19:45:46 +05:30
Robin Ward
b1271ed44b FIX: Remove html entities from text emails 2014-10-06 13:57:38 -04:00
Arpit Jalan
0ae0552543 FEATURE: show topic category in email subject 2014-10-03 22:08:59 +05:30
Arpit Jalan
330b7ba54a FEATURE: add site preference for standard subjects, including support for Re 2014-09-29 21:54:29 +05:30
Arpit Jalan
648d3f3458 FIX: properly align username for suppressed avatar images 2014-09-25 11:17:23 +05:30
Arpit Jalan
0a64657fab Suppress images for short emails 2014-09-24 23:52:27 +05:30
riking
a0dccf7bc0 FIX: Add "On day, name wrote:" quote trigger for emails 2014-09-09 16:27:06 -07:00
Sam
59d04c0695 Internal renaming of elder,leader,regular,basic to numbers
Changed internals so trust levels are referred to with

TrustLevel[1], TrustLevel[2] etc.

This gives us much better flexibility naming trust levels, these names
are meant to be controlled by various communities.
2014-09-05 15:20:52 +10:00
Robin Ward
1c5e8efa68 FEATURE: Show an email icon beside posts that arrived via email 2014-09-04 13:04:41 -04:00
Sam
1bef22bbb9 Merge pull request #2703 from riking/email-pr-receiver
Heavy refactor for Email::Receiver
2014-08-29 09:59:59 +10:00
riking
8ddd90daa4 Have parse_body() recover from ASCII-8BIT encoding
Added a test to make sure that the result can be passed into TextCleaner
(which expects UTF-8)
2014-08-28 14:38:19 -07:00
riking
0a09593f3b FIX: Prefer HTML in incoming emails, heavily refactor email receiver
This commit heavily refactors Email::Receiver to both better handle
different emails and improve testability.

A primary focus of the refactor is reducing the usage of class
variables, in favor of actually passing parameters - making it possible
for multiple tests to use the same Receiver instance.

The EmailLog reported when a topic is created is reflected to put the
user's email in the to_address field, instead of the system address.

The discourse_email_parser function is renamed to
discourse_email_trimmer, and additional stopping conditions are added to
make up for EmailReplyParser's inability to deal with html at the start
of a line.

The force_encoding calls are refactored out to a 'fix_charset' method.

parse_body is renamed to select_body, and the scrub_html method is
dropped in favor of the new HtmlCleaner class.

A new parse_body method is added, which performs the job of the removed
lines of code in the 'process' method.

EmailUnparsableError is redefined again, to be encoding errors (when the
declared encoding is not what was delivered).
2014-08-28 14:36:10 -07:00
riking
cb55ef4702 Add Email::HtmlCleaner for email processing
This class is in charge of stripping out most of the crap from the HTML
portion of emails that email clients generate, so that it can be sanely
post-processed for signatures and quoting boundaries.
2014-08-28 14:36:10 -07:00
riking
0d0225133c FIX: Failed incoming emails could create empty topics
A failure condition is eliminated where a topic would be created, but post
creation would fail, leaving the forum with a topic without any posts.
By asking PostCreator to create the topic instead, inside of its
transaction, this failure condition is eliminated.

Additionally, attachments are restored to working status. Previously,
the attachment code would build up the post raw, but then drop it and
not do anything with the result (creating orphaned uploads). By actually
placing the raw value back in the options hash, it is included in the
created post.
2014-08-28 14:35:43 -07:00
Eyal Levin
e0c2f3df3a Enable RTL direction in emails. 2014-08-27 14:38:03 +03:00
Régis Hanol
77ba2015eb FEATURE: new disable_emails site setting 2014-08-23 11:07:37 +02:00
Robin Ward
b1eb44bd0b Merge pull request #2678 from techAPJ/patch-2
FIX: lazyYT youtube links not getting included in email
2014-08-22 14:54:41 -04:00
Arpit Jalan
f92b69ed2f FIX: lazyYT youtube links not getting included in email 2014-08-23 00:21:31 +05:30
riking
cce8b4720a Have reciever handle multiple To addresses 2014-08-13 11:43:49 -07:00
Neil Lalonde
50ac4c6336 FIX: cleanup aliases in email From and Reply-to fields to prevent Bad sender address syntax errors 2014-08-08 13:35:47 -04:00
Robin Ward
6783565d8f Revert "Enable RTL direction in emails." 2014-08-06 15:30:07 -04:00
Eyal Levin
f8c99a35d0 Enable RTL direction in emails. 2014-08-06 15:27:15 +03:00
Sam
dcc9923e4b FIX: failed messages posted via email silently ignored
also... test suite over mocking
2014-07-31 18:46:02 +10:00
Neil Lalonde
b3c149de22 FIX: use email_site_title for emails like reset password and account activation too 2014-07-22 15:52:20 -04:00
riking
17db265b41 Remove use of email_in_address and email_in_category 2014-07-17 10:25:13 -07:00
Robin Ward
dd6fd7fa39 FIX: Don't put iframes in emails where they are sanitized out. Replace
them with links.
2014-07-14 16:41:37 -04:00
Neil Lalonde
362adb0498 FIX: add site setting email_site_title, which overrides title in reply by email address in case the title has invalid characters 2014-07-09 16:44:18 -04:00
riking
da9048f3ea Fix email code & tests 2014-06-27 12:04:31 -07:00
Robin Ward
f3135533c2 Add some more mail headers back 2014-06-14 12:29:50 -04:00
Jeff Atwood
d782a7dc48 remove List-Post header as a test 2014-06-14 01:21:32 -07:00
Jeff Atwood
834b83aaea use a variable to set the header 2014-06-14 00:13:08 -07:00
Jeff Atwood
c4d8d80b07 only set List-Post if reply via email is on 2014-06-13 15:49:11 -07:00
Jeff Atwood
beaa145572 some email notification header fixes 2014-06-13 15:42:20 -07:00
Robin Ward
c690fa0d19 FIX: Replace protocol relative URLs in emails 2014-06-13 17:11:04 -04:00
Robin Ward
8e882ad145 CSS: Attempt to remove hairline border from android gmail blockquotes. 2014-06-09 15:28:26 -04:00
Peter N Lewis
0af1242aa8 Use an appropriate name in the Reply-To header
Use "Site Name <>" for the Reply-To header when the reply is to the site or a public topic.

Use "username <>" for the Reply-To header only when the reply is to a private message topic.
2014-06-06 21:09:00 +08:00
Robin Ward
ab319de4f9 FIX: Github commit oneboxing formatting in emails 2014-05-14 16:40:54 -04:00
Robin Ward
954f0df625 Email formatting fix: Convert aside to div for better email handling 2014-05-13 14:45:00 -04:00
Robin Ward
1bd79672ee Make oneboxes in emails look slightly less awful 2014-05-09 14:39:26 -04:00
Neil Lalonde
f44bd4ec28 Don't allow sending private messages to suspended users. Emails to suspended users should tell them how to respond, since they can't. 2014-05-06 15:01:27 -04:00
Robin Ward
4d3effa686 User new /my/preferences route in an email 2014-04-29 16:34:31 -04:00
Robin Ward
2341118570 Add categories to the first topics in the email digest 2014-04-17 15:22:19 -04:00
Régis Hanol
4a93b1b0bc missed a newline 2014-04-15 00:04:13 +02:00
Régis Hanol
2505d18aa9 FEATURE: support email attachments 2014-04-14 22:55:57 +02:00
Régis Hanol
e6989b5313 Merge pull request #2192 from jorgemanrubia/configurable-emails-prefix
Option to change the subject prefix in emails
2014-03-28 15:08:50 +01:00
Neil Lalonde
fd504e741f FIX: reply by email can handle emails with attachments. Attachments are still ignored, but a post or topic can be created from the email now. 2014-03-28 09:57:20 -04:00
Jorge Manrubia
806924dd7e Option to change the email subject prefix
It adds a new setting 'email_prefix' to configure which [label] will be used in the subject of emails. Discourse currently uses '[title]'. The problem is that sometimes you need to set a longer title, that doesn't really work well for emails. I think this is very common since the HTML `<title>` tag is very important for SEO.

It will default to '[title]' if this setting is not used.

See: https://meta.discourse.org/t/where-to-change-the-email-subject-prefix/11989
2014-03-26 23:06:00 +01:00
Régis Hanol
5b7f2b4488 ooops. I don't know how to write smtp 2014-03-12 11:55:08 +01:00
Régis Hanol
c5298cd25f BUGFIX: require net/stmp module to properly handle exceptions 2014-03-12 11:53:10 +01:00
Sam
b7ece53966 BUGFIX: rescue should splat 2014-03-09 23:06:54 +11:00
Régis Hanol
18e9d319fd BUGFIX: catch STMP client errors in email sending background job
Will log the exception message in the skipped reason instead of keeping
the job in the queue whenever the email address is invalid
2014-03-07 16:33:15 +01:00
Benjamin Kampmann
024597e643 Switch to proper exception handling system for better user feedback
- Replace implicit return code-system in Email::Receiver with proper exception system
 - Update tests to check for exceptions instead
 - Test the PollMailbox for expected failures
 - Add proper email-handling of problematic emails
"
2014-02-28 17:02:58 +01:00
Benjamin Kampmann
d32cb55837 Add public-inbox to Email-In-Feature
- Adds the advanced option to accept email from non-users per category email-address
 - Adds tests covering the new feature
 - Adds UI to configure this feature in the frontend
2014-02-28 16:53:58 +01:00
Benjamin Kampmann
37cea49459 Add Email-In-Per-Category
- allow the configuration of an inbox-email-address per category
 - post emails to that email into that category instead of global

 - Adds UI for configuration
 - Adds Documentation for configuration
 - Adds Tests for new feature
2014-02-28 16:53:58 +01:00
Benjamin Kampmann
4af2cf3f23 Refactor and clean up New-Topic via Email
With the new email_in admin configuration setting, emails to the email_in_address fetched via POP will now be processed and posted as new topics to the forum.

With the email_in_min_trust you can control the trust level the user needs to have at least to be able to post an email as a new topic.

Also contains tests for the email-in feature and minor clean ups
2014-02-28 16:53:58 +01:00
Allen Hancock
dad43b9853 Optionally allow discourse to create new topics from email. 2014-02-28 16:53:58 +01:00
Sam
a28a0bbeeb PERF: stop messing with strings that come back from I18n.t
allows better caching
2014-02-18 14:10:03 +11:00
Neil Lalonde
35dae76bbd Log when and why an email was not sent in email_logs 2014-02-14 13:06:39 -05:00
Robin Ward
318e692290 FIX: If there is an exception when parsing one email, don't stop all
work, return an error code and continue.
2014-02-12 12:08:34 -05:00
Robin Ward
2d15c82b26 FIX: Digest styling for oneboxes 2014-01-22 15:30:44 -05:00
Herb Jiang
5fa464e10b force_encoding according to the charset in mail, this solve encoding problem when not using ‘utf-8’ charset. 2014-01-19 02:12:38 +08:00
Sam
9738c4ff48 FEATURE: backport a minimal String#scrub
BUGFIX: invalid byte sequence in email would explode all processing
2013-12-30 14:05:25 +11:00