Is parameter `--watch-courier` important to send ...
# ory-selfhosting
g
Is parameter
--watch-courier
important to send out emails. Without using this parameter I am not receiving emails Case 1: Email Not Received
Copy code
["kratos", "-c", "/etc/config/kratos/kratos.yml", "serve"]
Case 2: Email Received
Copy code
["kratos", "-c", "/etc/config/kratos/kratos.yml", "serve", "--watch-courier"]
1
b
yes, without it, the process that sends out the emails is not started.
👍 1
s
you can either start one process to serve and send the mails with the flag, or do it in separate processes
because you only ever want one "courier" instance running, otherwise emails could be send multiple times
g
Hey @steep-lamp-91158 thanks for the guidance. Can you please elaborate on how to send mail as a separate process? Your thought process is correct if we scale kratos serve with
--watch-courier
, having multiple instances of this would result into multiple emails sent How would
kratos serve
will know about the 2nd
kratos --watch-courier
config in order to send email BTW we are using kubernetes and running multiple instances of
kratos serve
s
This should help
you have to take care yourself to only have one courier running
g
So what do you mean is the following 1. Create a k8s deployment of
["kratos", "-c", "/etc/config/kratos/kratos.yml", "serve"]
2. Create a new k8s deployment of
kratos courier watch
with replica = 1 How would #1 know about #2 to send out email
s
the emails are queued in the db
so yeah, basically what you said
g
Thanks a lot for the support. I will give it a try and report back