Commit graph

69 commits

Author SHA1 Message Date
Lisa Durand
71268c7f3b hide decision from email for tiers if procedure has accuse de lecture 2024-04-15 11:15:13 +02:00
Lisa Durand
5bbc4cab50 hide decision displayed in messagerie with auto commentaire 2024-04-15 11:15:13 +02:00
Lisa Durand
ae08044ff2 create AR email and send it at the right time 2024-04-15 11:15:05 +02:00
Colin Darie
68ee4a3404
feat(mail): use contextualized Current.application_name 2024-04-02 18:47:48 +02:00
Colin Darie
5bf580b6ac
feat(mail): link with hosts for recipient for notification mailer 2024-04-02 18:47:45 +02:00
Colin Darie
c05aaa5f35 fix(email): dynamic subject should be escaped, cf RFC 2047 which have its own encoding 2024-02-20 18:29:41 +01:00
Colin Darie
9bdf525ff1
Merge pull request #9863 from colinux/fix-message-html-injection
Tech: échappe les tags de données utilisateur dans les modèles pour email
2023-12-21 08:50:21 +00:00
Lisa Durand
3e872c5246 add email for tiers when repasser en instruction 2023-12-20 11:51:02 +01:00
Colin Darie
fa37c6c62b
fix(tags): escape user data tags for emails 2023-12-15 14:05:11 +01:00
Lisa Durand
2f1259709a fix email content 2023-12-14 10:01:13 +01:00
Kara Diaby
57dfe2b0f6 Améliorations après retours PR 2023-12-13 09:21:09 +00:00
Lisa Durand
878f58e00c add mailer test 2023-12-12 22:35:11 +00:00
Paul Chavard
3de0367ed9 fix(email_template): less magic - less bugs ! 2023-11-29 20:36:44 +00:00
Paul Chavard
4842fc4d94 feat(tags): all tags should have ids 2023-11-21 13:55:25 +01:00
Martin
ce9dbed663 amelioration(NotificationMailer): sort la creation des commentaire sur la messagerie du mailer [trop de prob possible sinon: au retry on dupliquait les commenaitres, si le mail foirait, on commentait pas etc...] 2023-07-11 15:11:40 +02:00
Colin Darie
1da1e67067 fix(mail): use default template when no custom template was found 2023-07-06 10:53:11 +02:00
Lisa Durand
e1260a3df8 fix wrong encoding of special character in email notification subject 2023-03-31 16:58:41 +02:00
Colin Darie
aeb602a63d fix(mail): default subject fallback when subject template is empty
Closes #8448
2023-02-09 17:49:43 +01:00
Colin Darie
5526cb5173 fix(mail): limit generated subjects to 100 characters 2023-02-09 17:39:56 +01:00
simon lehericey
fcfe09f05a refactor(user): rename delete_and_keep_track_dossiers 2022-11-16 17:52:47 +01:00
Pierre de La Morinerie
4fcb85fd65 app: remove procedure_dossier_papertrail feature flag
The feature is now enabled for all procedures.
2022-05-24 17:32:11 +02:00
Pierre de La Morinerie
0063b68689 mailers: add deposit receipt to initiated_mail
See #6146
2022-05-17 10:25:13 +02:00
Paul Chavard
f6508899de Refactor NotificationMailer 2021-05-04 12:05:06 +02:00
Pierre de La Morinerie
4cb747fdb6 specs: always require rails_helper
Test helpers are separated between two files: spec_helper and
rails_helper. This separation is meant to allow tests that do not
require Rails (like testing standalone libs) to boot faster.

The spec_helper file is always loaded, through `--require spec_helper`
in the `.rspec` config file. When needed, the rails_helper file is
expected to be required manually.

This is fine, but:
- Many test files have a redundant `require 'spec_helper'` line;
- Many test files should require `rails_helper`, but don't.

Not requiring `rails_helper` will cause the Rails-concerned section of
the test environment not to be configured–which may cause subtle bugs
(like the test database not being properly initialized).

Moreover, Spring loads all the Rails files on preloading anyway. So the
gains from using only `spec_helper` are thin.

To streamline this process, this commit:
- Configures `.rspec` to require `rails_helper` by default;
- Remove all manual requires to spec_helper or rails_helper.

Reference: https://stackoverflow.com/questions/24145329/how-is-spec-rails-helper-rb-different-from-spec-spec-helper-rb-do-i-need-it
2020-03-31 12:48:32 +02:00
Pierre de La Morinerie
724ff50363 factories: rename dossier for_individual to with_individual
This clarifies the distinction between

```
create :procedure, :for_individual
```

and

```
create :dossier, :with_individual
```
2020-01-21 17:24:56 +01:00
Chaïb Martinez
dd6c6bfe7a mailers: add a NO_REPLY address to transactional emails 2019-09-10 13:37:28 +02:00
Pierre de La Morinerie
8313752663 mailers: add CTA to templated emails 2019-07-25 12:25:50 +02:00
Pierre de La Morinerie
f32357f527 specs: avoid weird hacks to test NotificationMailer private method
- testing private methods is a code smell
- this setup is especially brittle
- we test the equivalent public method right below
2019-07-22 16:22:20 +02:00
Nicolas Bouilleaud
bd47bf2691 Disable Messagerie in archived Dossiers and procedures
* Use the existing Dossier#messagerie_available? method
* Raise when attempting to build a Commentaire if not messagerie_available?
* Disable the Messagerie form if not messagerie_available?
* Add tests :)
* Tweak the Horaires formatting while we’re here.
2019-07-01 09:39:39 +02:00
Mathieu Magnin
1a97cd42de Fix missing helper in notification mailer 2019-04-11 12:25:55 +02:00
maatinito
e37372d261 Fix a typo 2018-12-20 16:21:27 +01:00
maatinito
a1a11adb83 [#325] Make the notification layout inherit from the general layout 2018-12-20 16:21:27 +01:00
Pierre de La Morinerie
ea8bc0c961 mailers: improve notification layout 2018-11-27 15:51:26 +01:00
Pierre de La Morinerie
e5303fd986 mailers: streamline the NotificationMailer
Notifications are now only for demarche-templated emails.
2018-11-20 14:46:31 +01:00
Pierre de La Morinerie
40cf7ebdcb mailers: update links to messagerie 2018-09-27 17:22:59 +02:00
lucien mollard
b2f2e75f43 mailer: add layout for notifications emails 2018-09-05 15:31:08 +02:00
Pierre de La Morinerie
2a5a8cf621 mailer: fix typo in spec 2018-09-05 15:25:46 +02:00
Pierre de La Morinerie
d7dd027cb8 mailer: improve naming in specs 2018-09-05 15:25:46 +02:00
gregoirenovel
b82ed65568 [Fix #885] Convert .text.erb to .html.haml 2018-06-01 17:14:48 +02:00
gregoirenovel
b364b8bfb3 Improve many subjects 2018-06-01 11:35:40 +02:00
gregoirenovel
a57e2388f6 Unify NotificationMailer methods’ signatures 2018-05-31 12:10:06 +02:00
Frederic Merizen
cce00e19c6 [#1972] Avoid passing unsaved templates to ActionMailer
So that all mail arguments can be serialized
2018-05-28 12:02:13 +02:00
Frederic Merizen
5ef129d960 [#1563] Remove attestation mail attachment 2018-05-09 10:42:40 +02:00
gregoirenovel
1b8b6a3274 TPS -> demarches-simplifiees.fr 2018-02-28 18:14:06 +01:00
gregoirenovel
142241dd16 Remove notifications 2018-02-06 14:07:20 +01:00
Frederic Merizen
56749769d6 [Fix #1186] Rename object to subject for mail templates 2018-01-09 16:00:31 +01:00
Mathieu Magnin
0f945e2fea Simplify mailer parameters to be serializable (even if mail_template.id is nil) 2017-10-13 21:27:17 +02:00
Simon Lehericey
e60ce35ae8 [Fix #196] Attestation: join the attestation to the closed mail
Add a upper limit to the attachment size as it could be a problem with Mailjet and receiver
(https://www.mailjet.com/support/what-is-the-size-limit-for-attachments-files-sent-via-mailjet,289.htm)

If the attestation cannot be sent, it is logged in sentry
2017-06-16 12:11:10 +02:00
gregoirenovel
70f637f088 [Fix #198] Add a Commentaire when we send a Notification email to a user 2017-05-12 14:03:48 +02:00
gregoirenovel
ddf02ccd6d Use a non-breaking space after the “numéro” contraction 2017-04-19 11:19:53 +02:00