Skip to content

Commit

Permalink
fix test email send route in route (#473)
Browse files Browse the repository at this point in the history
* fix test email send route in route

* Update pool/app/email/email_service.ml

---------

Co-authored-by: Marc <[email protected]>
  • Loading branch information
timohuber and mabiede authored Dec 16, 2024
1 parent f5d65a1 commit 0f6cd64
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pool/app/email/email_service.ml
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,10 @@ module Smtp = struct
let%lwt default_sender_of_pool = default_sender_of_pool database_label in
let%lwt test_email =
let%lwt sender =
Settings.(find_contact_email database_label |> Lwt.map ContactEmail.value)
match Database.Pool.is_root database_label with
| true -> default_sender_of_pool |> Pool_user.EmailAddress.value |> Lwt.return
| false ->
Settings.(find_contact_email database_label |> Lwt.map ContactEmail.value)
in
let recipient = test_email |> Pool_user.EmailAddress.value in
let subject = "Test email" in
Expand Down

0 comments on commit 0f6cd64

Please sign in to comment.