Closed eensander closed 5 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
lawnotation | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | May 2, 2024 0:19am |
Discussion points:
@CvdL-UM,
First, I implemented your suggested change. Next, considering your points:
Regarding the topic of integrating a custom method for sending emails in conjunction with the authentication emails in supabase, these discussions/threads are worth noting for future reference:
Maybe we need to switch the logic around and ditch the emails through Supabase. Although convenient with InBucket, it does cause a split between our mails. Instead, we can send all emails through our SMTP provider and catch all the emails locally in a mailbox through our SMTP provider. So like @eensander proposed before, a SMTP .env setting for production and another for local development. This does create another dependency, but it might leave the choice of SMTP provider up to the person hosting Lawnotation him/herself.
To send emails when new tasks have been assigned we can also have a look at Supabase's Database Webhooks
@CvdL-UM: Maybe we need to switch the logic around and ditch the emails through Supabase. Although convenient with InBucket, it does cause a split between our mails. Instead, we can send all emails through our SMTP provider and catch all the emails locally in a mailbox through our SMTP provider. So like @eensander proposed before, a SMTP .env setting for production and another for local development.
I agree that sending all emails with SMTP might be the best option. In order to keep using InBucket, we could look into setting up a development script that launches:
pnpm supabase start
docker run (...) --network supabase_network_lawnotation-ui
Notice: network name is constant since it is dependent on the
config.toml
'sproject_id
as can be seen here.
pnpm dev
@CvdL-UM: This does create another dependency, but it might leave the choice of SMTP provider up to the person hosting Lawnotation him/herself.
If we only send emails over SMTP with a package such as nodemailer, we could remove the MailTrap package that this PR introduces, meaning the amount of dependencies would remain the same.
@CvdL-UM: To send emails when new tasks have been assigned we can also have a look at Supabase's Database Webhooks
That sounds like a good consideration. Although, perhaps some points to take into account:
This PR (re)introduces MailTrap to send emails to users that already have an account and are assigned to a new task.
Please notice:
MAILTRAP_TOKEN
in the.env
file (see.env.example
),To test:
->
Validate in local InBucket that the targeted user received the "Invited to join Lawnotation" email->
Validate in MailTrap logs, or your live inbox if you used your real email-address, that the "Assigned to new task" email has been delivered.