DEV Community

What are the best practices for sending emails to your app users?

Adekoyejo Akinhanmi on March 08, 2018

Is it better to send emails async or sync and why?

Collapse
 
ben profile image
Ben Halpern

Typically async is best in order to return the response promptly, but make sure the async job never sends the email more times than it is supposed to!

Collapse
 
senornigeria profile image
Adekoyejo Akinhanmi

Whoa! That was fast. Thank you. I hope you don't mind that I ask again. Is it better to store user verification code in the user table to in a different table?

Collapse
 
joshuaai profile image
Josh Ihejiamaizu

Not sure what the verification code here refers to.

However, I always try to keep the main user table as lean as possible. The verification code can be in a join table, and then a sort of isVerified property on the user table.