Commit graph

65 commits

Author SHA1 Message Date
Régis Hanol
829143bf88 FIX: 'List-Unsubscribe' header wasn't added to emails sent when mailing_list_mode was enabled 2016-08-01 20:19:00 +02:00
Régis Hanol
7848a84e0e FIX: ensure summary emails have the 'List-Unsubscribe' header set 2016-07-15 11:39:29 +02:00
Robin Ward
5f91919663 Email support for watching first post 2016-07-07 12:23:19 -04:00
Arpit Jalan
40e9e1be66 FEATURE: user-friendly custom message 2016-06-08 18:23:22 +05:30
Arpit Jalan
4253141700 FEATURE: custom email message for topic invites 2016-06-07 23:43:15 +05:30
Arpit Jalan
7b205ebba4 FEATURE: customize invite email message 2016-06-06 20:15:30 +05:30
James Kiesel
feffe23cc5 FEATURE: More granular mailing list mode (#4068)
* Rearrange frontend to account for mailing list mode

* Allow update of user preference for mailing list frequency

* Add mailing list frequency estimate

* Simplify frequency estimate; disable activity summary for mailing list mode

* Remove combined updates

* Add specs for enqueue mailing list mode job

* Write mailing list method for mailer

* Fix linting error

* Account for stale topics

* Add translations for default mailing list setting

* One query for mailing list topics

* Fix failing spec

* WIP

* Flesh out html template

* First pass at text-based mailing list summary

* Add user avatar

* Properly format posts for mailing list

* Move make_all_links_absolute into Email::Styles

* Apply first_seen_at to user

* Send mailing list email summary hourly based on first_seen_at

* Branch and test cleanup

* Use existing mailing list mode estimate

* Fix failing specs
2016-05-21 15:17:54 +02:00
Sam
c095304d6d FEATURE: limit daily emails per user to 100 per day via site setting
- controlled via max_emails_per_day_per_user, 0 to disable
- when limit is reached user is warned
2016-03-23 15:08:48 +11:00
Robin Ward
5771d2aee2 SECURITY: Support for confirm old as well as new email accounts 2016-03-08 14:52:22 -05:00
scossar
5b5076c61d test for empty string 2016-03-04 20:20:58 -08:00
scossar
2d8b10d139 validate user locale 2016-03-04 13:21:30 -08:00
scossar
a20a52b25f add user locale 2016-03-03 17:21:50 -08:00
Sam Saffron
820a435af8 FEATURE: add "email in-reply-to user option"
We no longer include previous replies as "context", instead
we include and excerpt of the post being replied to at the bottom
of notifications, this information was previously missing.

Users may opt in to emailing previous replies if they wish
or opt out of "in-reply-to" which makes sense in some email clients that
are smarter about displaying a tree of replies.
2016-02-26 00:05:59 +11:00
Sam
ab06f86fbe FEATURE: allow users to control how many previous replies they get
- always means we always send previous replies with every email
- never means we do not
- "unless previously sent" ... is the default, in which we only email you each reply once

The default_email_previous_replies site setting can control this toggle
2016-02-19 13:57:07 +11:00
Régis Hanol
c740b42328 FIX: whitelist post_types used in context in email notifications 2016-02-12 12:10:30 +01:00
Arpit Jalan
82a75c00c0 UX: change 'Visit Topic' to 'Visit Message' for message notification email 2016-02-09 13:39:10 +05:30
Régis Hanol
7d992cb4c5 FIX: sending emails to mailing list subscribers wasn't working 2016-02-03 19:27:58 +01:00
Régis Hanol
378b7f964c Revert "FEATURE (WIP): add max-width and center email notifications" 2016-01-29 11:13:59 +01:00
scossar
017820e445 check for template 2016-01-27 18:39:20 -08:00
Sam
1bb485fca5 FIX: when a user got multiple replies to a topic, emails were missing 2016-01-27 12:20:08 +11:00
Sam
a2b72cc767 correct specs 2016-01-12 13:56:58 +11:00
Andy Waite
3e50313fdc Prepare for separation of RSpec helper files
Since rspec-rails 3, the default installation creates two helper files:
* `spec_helper.rb`
* `rails_helper.rb`

`spec_helper.rb` is intended as a way of running specs that do not
require Rails, whereas `rails_helper.rb` loads Rails (as Discourse's
current `spec_helper.rb` does).

For more information:

https://www.relishapp.com/rspec/rspec-rails/docs/upgrade#default-helper-files

In this commit, I've simply replaced all instances of `spec_helper` with
`rails_helper`, and renamed the original `spec_helper.rb`.

This brings the Discourse project closer to the standard usage of RSpec
in a Rails app.

At present, every spec relies on loading Rails, but there are likely
many that don't need to. In a future pull request, I hope to introduce a
separate, minimal `spec_helper.rb` which can be used in tests which
don't rely on Rails.
2015-12-01 20:39:42 +00:00
Arpit Jalan
5180d3e355 FEATURE: include email_prefix in digest email subject instead of site title 2015-06-03 22:22:29 +05:30
Arpit Jalan
b33654ac31 Remove site setting stubbing (Round 1) 2015-06-03 15:44:00 +05:30
Arpit Jalan
d9ec6888e1 FIX: allow site_name to be present in rejection email subject 2015-05-04 11:22:54 +05:30
Arthur Neves
439d0d2e37
Check Rails.version instead of ENV
Like that we can have code that works on multiple Rails versions, and we
dont need to mix a new method on Kernel.
Also, this makes easier to have multiple versions.
For instance, before master was 4.2, which is not the case anymore, so
on the code we should check versions and not Environment variables
2015-04-28 22:27:47 -04:00
Arpit Jalan
8c2d7dcaac FEATURE: invite existing user to a topic 2015-04-03 15:00:04 +05:30
Arpit Jalan
6e5540c107 FIX: do not show name in email if name on posts are disabled 2015-02-18 01:39:41 +05:30
Arpit Jalan
7771d2fb31 remove enable_email_names setting 2015-01-13 13:35:40 +05:30
Luciano Sousa
b3d769ff4f Update rspec syntax to v3
update rspec syntax to v3

change syntax to rspec v3

oops. fix typo

mailers classes with rspec3 syntax

helpers with rspec3 syntax

jobs with rspec3 syntax

serializers with rspec3 syntax

views with rspec3 syntax

support to rspec3 syntax

category spec with rspec3 syntax
2015-01-05 11:59:30 -03:00
Arpit Jalan
f84bdfdde3 FIX: if full user name is not provided, username should be present in email From header 2014-12-03 13:12:05 +05:30
Godfrey Chan
bddaf8193a HAX: check the message object, not the MessageDelivery object
See 669bf73 for background. It's probably better to rewrite these test without
using the internal `NullMail` class anyway.
2014-11-10 01:05:47 -08:00
Godfrey Chan
568ed3beaa HAX: force the lazy MessageDelivery object to create the mailer
Starting from Rails 4.2, calling MyMailer.some_method no longer result in an
immediate call to MyMailer#some_method. Instead, a "lazy proxy" is returned
(this is changed to support #deliver_later). As a quick hack to fix the test,
calling #message (or anything, really) would force the Mailer object to be
created and the method invoked.
2014-11-10 01:05:46 -08:00
Régis Hanol
ada750b384 fixed some more deprecations. 20 to go 2014-10-29 16:06:50 +01:00
Arpit Jalan
8700716fcd separate site setting for showing full name in emails 2014-10-22 00:50:39 +05:30
Arpit Jalan
83068fab94 FEATURE: show full name in emails 2014-10-21 23:34:44 +05:30
Arpit Jalan
20c2480eb3 FIX: fix broken test 2014-10-07 01:23:39 +05:30
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
Régis Hanol
de76b512c1 fix most deprecations in the specs (still some left) 2014-09-25 17:44:48 +02:00
Arpit Jalan
2f6c984c8c Improve invite email copy 2014-07-10 10:57:40 +05:30
Arpit Jalan
8395da5bd0 FIX: include topic title and domain name in topic invite mail 2014-07-10 10:05:28 +05:30
Arpit Jalan
223bbc3da3 FEATURE: include topic context in topic invite 2014-07-09 21:23:20 +05:30
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
64faee0935 Break down new topic counts by category if a digest contains many. 2014-04-17 16:42:40 -04:00
Sam
adb6541635 FEATURE: mailing list mode always available 2014-03-05 14:21:53 +11:00
Sam
9ec52d9425 BUGFIX: mailing list mode broke regular email 2014-02-12 16:51:26 +11:00
Sam
5267e5bea6 BUGFIX: emails sent from "2 replies" as opposed to correct user 2014-02-04 12:56:28 +11:00
Sam
51c06dea03 BUGFIX: hidden posts not absent from context 2014-01-31 16:37:40 +11:00
Sam
db1d01d1a2 Discourse as a Mailing List improvements
FEATURE: context is not emailed if we previously emailed you the post
FEATURE: site setting to enable_watch_new_topics , false by default.
  When enables users can elect to watch everything by default
FIX: Custom email subjects (x quoted you in [title], x replied to [title])
  was removed, this broke email grouping. TBD, include info in footer somehow
FIX: topic user specs were messy, reduce side effects
2013-12-30 13:02:12 +11:00