Hello everyone, I'm encountering difficulties with...
# talk-kratos
l
Hello everyone, I'm encountering difficulties with sending recovery and verification emails through Ory on an EC2 instance on AWS. The SMTP Courier configuration is functioning properly locally, and I've tested it with a Python script, confirming its effectiveness. Despite spending two days on the issue, I haven't had any success. Any suggestions on what steps I should take?
g
In no way an expert on this, but have you looked into whether the correct outbound port (25 for smtp) are opened on AWS?
l
Yes, 25, 465 and 587 are open. On the same ec2, i wrote a python script to send an email and it worked, but kratos isn't sending the emails
I also have kratos set up on my local machine in docker and there, it's working fine. I tried copying the same kratos.yml to ec2 but no luck. I've also tried different smtp servers like gmail, zoho and mailgun, no luck
g
I would suggest looking into: • what is in the database (courier_messages and courier_dispatches) to see if it is marked as success or failed or where it goes wrong • Logs of the courier service
Courier message dispatches to my knowledge contain an error field. Not sure if that value is making it any clearer? šŸ˜„
l
courier_messages have those rows, with status 1, I'll check again for error fields. courier_dispatch is empty
send_count
is 0, no such error in logs
g
If send_count is zero I would expect some error at least šŸ˜„. Do you see any errors in the Kratos server when starting (about courier)
l
When I hit the submit button for recovery:
When I start/serve kratos:
This is when I start kratos on docker in my machine, I cannot see the marked response on the above one which is on ec2
Okay I got it solved after struggling for 2 days with it šŸ™‚ instead of
/opt/kratos/bin/kratos -c /opt/kratos/config/kratos.yml serve
I had to use
/opt/kratos/bin/kratos -c /opt/kratos/config/kratos.yml serve --watch-courier
thanks @gifted-waitress-14272, your last reply helped me to reach the cause šŸ™Œ
g
Awesome