diff --git a/config/environments/development.rb b/config/environments/development.rb index 4b96a6c33..96dc809bb 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -39,9 +39,17 @@ Rails.application.configure do # Raises helpful error messages. config.assets.raise_runtime_errors = true - config.action_mailer.delivery_method = :test + # Action Mailer settings + config.action_mailer.delivery_method = :smtp config.action_mailer.default_url_options = { host: 'localhost', port: 3000 } + # Config for mailcatcher https://mailcatcher.me/ + config.action_mailer.smtp_settings = { + :address => "localhost", + :port => 1025, + :locale => 'fr' + } + # Raises error for missing translations # config.action_view.raise_on_missing_translations = true diff --git a/spec/mailers/previews/notification_mailer_preview.rb b/spec/mailers/previews/notification_mailer_preview.rb new file mode 100644 index 000000000..dda299980 --- /dev/null +++ b/spec/mailers/previews/notification_mailer_preview.rb @@ -0,0 +1,5 @@ +class NotificationMailerPreview < ActionMailer::Preview + def dossier_received + NotificationMailer.dossier_received(Dossier.last) + end +end