Martin
1ee67d511d
amelioration(mails): permet a nos mails d'inclure des balises <a> pour faciliter l'usage des mail envoyés
2023-02-06 11:01:28 +01:00
Martin
4990c448b1
amelioration(mail.prioritaire): en plus des mails de device, ajoute la gestion du routage des autres mails critique
2023-01-24 11:49:53 +01:00
Colin Darie
784b0458fe
feat(dolist): consolidate dispatched events with delivered emails
2023-01-18 09:56:40 +01:00
Colin Darie
6615165b2e
refactor(mailer): extract dolist logic into its concern
2023-01-17 14:26:11 +01:00
Colin Darie
ce7e674159
feat(mailer): make errors interceptable by jobs so they will retry
...
Comme on intercepte chaque `StandardError` pour le monitoring des mails
en erreur, l'erreur n'était plus visible par le job, et les emails
étaient perdus.
A la place on re-raise une autre erreur pour que le job échoue afin de
retry plus tard. Pour ne pas être "avalée" par le rescue_from,
cette erreur doit héritée d'`Exception` plutôt que `StandardError`.
NB: il faudrait parvenir à écrire un test pour vérifier ce comportement.
Pour être vérifié en dev, il faut activer `raise_delivery_errors`
comme en production.
2023-01-17 14:26:11 +01:00
Colin Darie
01f227e1c7
fix(mailer): dolist header in devise mailer
2023-01-11 18:52:14 +01:00
Martin
3e6b82ed9e
amelioration(safe_mailer): ajoute au manager la fonction pour configurer le routage des mails sur un fournisseur unique
...
Update app/mailers/devise_user_mailer.rb
Co-authored-by: LeSim <mail@simon.lehericey.net>
2023-01-11 17:32:24 +01:00
Martin
d535735155
amelioration(devise_mailer): oriente les mails de devise vers un fournisseur quand cela est configuré
2023-01-11 17:13:05 +01:00
Colin Darie
d911bc02c0
refactor(mailer): set dolist header in DeviseUserMailer
2023-01-10 16:07:35 +01:00
Colin Darie
5ae5de0d9c
refactor(email): log event when error occurs before recipients was set
2023-01-10 16:07:35 +01:00
Colin Darie
b9c1799e60
refactor(mailer): shared error concern
2023-01-10 16:07:35 +01:00
Colin Darie
0a22c1d2f0
chore(email): log smtp errors
2023-01-10 16:07:35 +01:00
Sébastien Carceles
20136b7ac8
feat(demarche): create and prefill a dossier with POST request ( #8233 )
...
* add base controller for public api
* add dossiers controller with basic checks
* create the dossier
* ensure content-type is json
* prefill dossier with given values
* mark a dossier as prefilled
When a dossier is prefilled, it's allowed not to have a user.
Plus, we add a secure token to the dossier, which we will need later to set a
user after sign in / sign up.
* set user as owner of an orphan prefilled dossier
When a visitor comes from the dossier_url answered by the public api,
the dossier is orphan:
- when the user is already authenticated: they become the owner
- when the user is not authenticated: they can sign in / sign up / france_connect
and then they become the owner
So here is the procedure:
- allow to sign in / sign up / france connect when user is unauthenticated
- set dossier ownership when the dossier is orphan
- check dossier ownership when the dossier is not
- redirect to brouillon path when user is signed in and owner
* mark the dossier as prefilled when it's prefilled
(even with a GET request, because it will be useful later on, for
exmample in order to cleanup the unused prefilled dossiers)
* system spec: prefilling dossier with post request
2023-01-03 14:46:10 +01:00
Paul Chavard
4a4ce67ef6
fix(dossier): explicitly send draft notification email
2022-12-26 22:02:33 +00:00
Paul Chavard
f49a1baeec
refactor(groupe_instructeur): remove mailer should take a list of instructeurs
2022-12-06 12:01:54 +01:00
Paul Chavard
e7766694d3
fix(messages): retry stale blobs
2022-11-02 09:19:51 +01:00
simon lehericey
097082afc9
fix(dolist): reduce message name variability
2022-10-20 15:29:56 +02:00
simon lehericey
0e75f9960b
fix: send_dossier_decision preview
2022-10-06 17:43:09 +02:00
Kara Diaby
f8d4644f73
models
2022-09-02 16:23:27 +02:00
Martin
2f5528398f
feat(manager#outdated_procedure): allow super admin to enable procedure_expires_when_termine_enabled for old procedure
...
revew(typo): various typo, tx christophe :-)
fix(spec): due to typo fixes
2022-08-24 13:10:48 +02:00
Martin
7fb85c97cb
feat(Administrateur::ArchivesControllers): add archives #index and #create for admin
2022-07-04 14:18:46 +02:00
Martin
274b5eab2e
feat(invite): wrap invitation with targeted_user_links
2022-06-17 16:44:37 +02:00
Martin
8b487c847b
fix(instructeurs/avis#revive): ArgumentError on AvisMailer.avis_invitation
2022-06-14 08:41:09 +02:00
Martin
cb890343ff
feat(targeted_user_link): add targeted user link to wrap expert invitation in order to avoid access issue when the expert is connected with another account
...
feat(user.merge): ensure to merge user.targeted_user_link
Update app/models/targeted_user_link.rb
Co-authored-by: LeSim <mail@simon.lehericey.net>
Update app/models/targeted_user_link.rb
Co-authored-by: LeSim <mail@simon.lehericey.net>
Update app/models/targeted_user_link.rb
Co-authored-by: LeSim <mail@simon.lehericey.net>
feat(db/create_targeted_user_links): ensure not null with fk
2022-05-31 14:50:31 +02:00
Christophe Robillard
f14cd7b022
remove warning mail for dubious procedures
2022-05-25 14:44:53 +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
54b559364a
feat(dossier): replace discarded with visible_by_administration
2022-03-10 14:29:40 +01:00
Kara Diaby
2eb35065f8
fix dossier deletion mailers
2022-01-25 11:46:05 +01:00
Martin
8a315a4ac1
feat(UserMailer.france_connect_merge_confirmation): in addition to distance_of_time_in_words, add exact expiration date
2021-11-25 17:34:37 +01:00
Martin
ff073f8884
Add confirmation by email when merging DC/FC accounts
...
feat(fci.confirmation_code): add confirmation code to france_connect_informations
feat(user_mailer.france_connect_confirmation_code): add confirmation by email mail method/preview/spec, pointing to merge_mail_with_existing_account (reuse existing method)
feat(mail_merge): mail merge
feat(merge.cannot_use_france_connect): same behaviour as callback
clean(fci.confirmation_code): use same token for mail validation as merge
feat(resend_france_connect/particulier/merge_confirmation): resend email with link. also enhance some trads, cleanup halfy finished refacto
clean(tech): finalize story by plugging merge_with_new_account to email validation
fix(deadspec): was removed
fix(spec): broken after last refactoring
lint(rubocop): space before parenthesis
lint(haml-lint): yoohoooo space before =
fix(lint): scss now :D
Update app/assets/stylesheets/buttons.scss
cleanup
feat(france_connect): re-add confirm by email, with an option for confirmation by email instead of only confirmation by email
fixup! Add confirmation by email when merging DC/FC accounts
fix(lint): haml_spec failure
2021-11-25 17:34:34 +01:00
Martin
f0950b592b
clean(CommentaireService): extract soft delete within controller. returning an instance with an error[:base] is not persisted with validation : avoid poluting stuff
2021-11-16 16:13:11 +01:00
Martin
8bbd77f89f
refactor(mail.delay): use simplier implementation using after_action to prevent email delivery with delay
2021-11-16 15:12:05 +01:00
simon lehericey
b160086cc5
update update_email to allow merge
2021-11-04 16:10:09 +01:00
Pierre de La Morinerie
8748b6f494
i18n-tasks: add hint for default_i18n_subject in mailers
2021-09-21 10:44:20 -05:00
Paul Chavard
46226b7930
fix(i18n): use size instead of count in dossier mailers
2021-09-08 14:39:46 +02:00
Paul Chavard
d6cbdf2a48
feat(dossier): add dossier transfer models
2021-09-08 14:39:46 +02:00
Paul Chavard
6a5a8233b5
feat(i18n): send dossier emails with its user locale and improuve translations
2021-09-07 09:51:23 +02:00
Paul Chavard
cd9f7df502
feat(i18n): send dossier notifications with its user locale
2021-09-07 09:51:23 +02:00
kara Diaby
9b1a522241
fixup! modify mailers
2021-07-27 19:38:21 +02:00
Paul Chavard
9b0dae4cc2
Fix apostrophes ‘ -> ’
2021-05-26 18:05:14 +02:00
Paul Chavard
f6508899de
Refactor NotificationMailer
2021-05-04 12:05:06 +02:00
Paul Chavard
a4fd629f4a
Enable user destruction
2021-05-04 12:05:06 +02:00
Paul Chavard
e240dd6d2c
remove NewAttestationMailer
2021-05-04 12:05:06 +02:00
Christophe Robillard
f40d96fbd2
Revert "Revert "Export de tous les dossier d'une démarche""
...
This reverts commit d9a588b52e
.
2021-04-29 17:29:47 +02:00
krichtof
d9a588b52e
Revert "Export de tous les dossier d'une démarche"
2021-04-29 16:07:18 +02:00
Christophe Robillard
07cc4fa97f
add service to create procedure archive
2021-04-28 11:40:58 +02:00
Pierre de La Morinerie
360f4be4c9
views: replace link by a round_button in the password reset email
2021-04-22 14:24:15 +02:00
kara Diaby
663fa50f02
notify expert when a decision is taken on a dossier
2021-04-15 11:29:55 +02:00
simon lehericey
fde433a7cf
do not ask for avis if the dossier is absent
2021-04-13 12:04:45 +02:00
kara Diaby
e79b1204e0
change avis invitation mailer
2021-03-18 11:38:52 +01:00
Pierre de La Morinerie
2d1c50917f
mailers: fix Ruby 2.7 arguments passing
2021-02-09 09:20:46 +01:00
Paul Chavard
41c3a98d7d
Update Raven references to use Sentry
2021-01-28 19:46:36 +01:00
kara Diaby
c7643154d1
final optims after sim review
2020-12-16 15:00:26 +01:00
kara Diaby
00b5ad7a10
EQT instructeur, je peux supprimer un dossier terminé
2020-12-16 15:00:26 +01:00
clemkeirua
f7ebbdc7c2
use match if possible
2020-09-25 12:53:11 +00:00
clemkeirua
14e1f8d06c
more accurate naming in AdministrationMailer#invite_admin
2020-09-18 11:16:34 +02:00
clemkeirua
52548d7646
ajout du nom d'application dans les mailers
2020-07-23 16:17:52 +02:00
Pierre de La Morinerie
e34f82a6fb
mailers: ignore more SMTP errors
...
Although we already ignore "invalid recipient" errors, a new type
of error recently popped: the mail service responds with
> Net::SMTPServerBusy '400 unexpected recipients: want atleast 1, got 0'
We want to also ignore this kind of errors.
2020-07-13 16:17:55 +02:00
Paul Chavard
210389d0f8
Remove admin creation notification email
2020-06-25 16:29:06 +02:00
Judith
6b65ee8d15
mailers: display auto-archive date in notifications
2020-05-28 13:22:02 +00:00
Paul Chavard
f1b531911b
Handle processed dossiers in deletion mailers
2020-04-22 15:39:10 +02:00
Christophe Robillard
ae18ff6627
Notifie tous les instructeurs lors dépôt dossier
...
- envoie un mail à tous les instructeurs d'une procédure après le dépôt
d'un nouveau dossier
2020-04-09 14:33:56 +02:00
Christophe Robillard
415d5c765e
envoie une notification à chaque follower_instructeur après un commentaire déposé
2020-04-09 14:17:07 +02:00
Paul Chavard
61eaca928f
remove WarnExpiringDossiersJob
2020-04-09 11:11:51 +02:00
Pierre de La Morinerie
dc6ff3b4ea
mailers: in avis requests, replace the small CTA link by a large button
...
Fix #3402
2020-04-07 12:05:36 +02:00
Paul Chavard
7ba4c513e6
Refactor notify near deletion mailers
2020-04-01 17:40:52 +02:00
maatinito
f5c2dc03c5
#4807 better method/variable naming
2020-03-24 16:46:23 -10:00
Christian Lautier
e61c53f267
Fix #4807 48h before closing a procedure, notify users their draft is not submitted
2020-03-24 16:46:23 -10:00
Paul Chavard
cd0acb1344
Cleanup dossier mailers
2020-03-19 16:52:18 +01:00
simon lehericey
043847ae6e
change notify_automatic_deletion_to_administration signature
2020-03-18 15:25:02 +01:00
Christophe Robillard
e0f4957dfd
notify instructeur after groupe_instructeur changed
2020-02-26 11:25:07 +01:00
Pierre de La Morinerie
8eb6dd78a1
mailers: fix procedure_after_confirmation in the confirmation email
...
As mailers are run asynchronously, they don't have access to the
CurrentConfirmation defined in an earlier request.
For the procedure_after_confirmation to be serialized to the Mailer,
we need to pass it at creation time.
2020-02-25 15:17:09 +01:00
Pierre de La Morinerie
6664965961
mailers: add procedure context to the confirmation link
...
This allows to redirect the user to the procedure they signed up for
even when the browser session is not available (like if they changed
of browser).
Fix #4738
2020-02-25 11:45:36 +00:00
clemkeirua
4343bb3918
Revert "openly fail when not delivering mail"
...
This reverts commit 415cc2c2f1
.
2020-02-20 15:31:43 +00:00
Paul Chavard
b7051da278
Remove old export code
2020-02-19 18:19:17 +01:00
Paul Chavard
e931c0800d
Remove notify_unhide_to_user and notify_undelete_to_user mailers
2020-02-18 17:56:52 +01:00
Paul Chavard
318baf316e
Add notify_en_construction_near_deletion mailer
2020-02-18 17:18:14 +01:00
Paul Chavard
8c77d91e9f
Add notify_automatic_deletion_to_administration mailer
2020-02-18 17:18:06 +01:00
Paul Chavard
4e116f06a6
Add notify_automatic_deletion_to_user mailer
2020-02-18 17:15:32 +01:00
Pierre de La Morinerie
e746d90016
mailers: add a link to the procedure when the account already exists
2020-02-12 13:24:52 +00:00
clemkeirua
415cc2c2f1
openly fail when not delivering mail
2020-02-05 10:46:01 +01:00
simon lehericey
c02e8b9553
Routing: send emails to the right group
2019-12-16 17:47:08 +01:00
simon lehericey
006e426a11
Work on deletion mail
2019-12-03 17:18:53 +01:00
simon lehericey
79bfb8b143
Delete expired dossiers
2019-12-03 17:18:53 +01:00
simon lehericey
6391f7ff9c
Work on notify_near_deletion mailer
2019-12-03 17:18:53 +01:00
simon lehericey
03b7e81ca4
Send deletion notice for near expired brouillon
2019-12-03 17:18:53 +01:00
clemkeirua
f2c69400aa
add rescue_from to UserDeviseMailer
2019-11-21 14:59:30 +01:00
simon lehericey
9ca026a630
Use a select2 box for looking to instructeurs
2019-11-18 17:08:51 +01:00
clemkeirua
75923f7cb2
add explanation about rescue_from in application_mailer
2019-11-07 10:13:11 +01:00
clemkeirua
7f76ab6671
disable retry sending a mail with an invalid email adress
2019-11-07 10:11:48 +01:00
Pierre de La Morinerie
a462edb9bc
instructeurs: alias instructeur.email
...
This also means we need to replace instances of `pluck` on the email
column.
2019-11-04 10:44:24 +01:00
simon lehericey
a5ffe9f54b
Remove instructeur from the group
2019-10-23 21:47:20 +02:00
simon lehericey
a6deafd885
Add instructeurs to groupe
2019-10-23 21:47:20 +02:00
clemkeirua
cdab08b198
UI work
2019-10-22 09:51:14 +02:00
clemkeirua
43424e4f4e
merge with the work of paul, using 3 links
2019-10-22 09:51:14 +02:00
clemkeirua
70ea5e167e
procedure download is performed through a controller in order not to leak the URL
2019-10-22 09:50:58 +02:00
clemkeirua
1af2b63ed1
initial implementation of async export
2019-10-22 09:50:58 +02:00
Paul Chavard
8fcf1353f3
Remove duplicated attachments
2019-09-17 18:12:53 +02: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
aa1cf6788b
mailers: turn revert_to_instruction into a notification email
2019-09-10 13:29:06 +02:00