maybe icon indicating copy to clipboard operation
maybe copied to clipboard

Centralize Postmark env variables to .env file

Open Shpigford opened this issue 2 years ago • 3 comments

Postmark is already used pretty extensively throughout the app for email sending, however the environment variables for it are sprinkled all over the app.

We need to centralize all of those in to the main .env file and include them as part of setup.

We should be able to continue using it as the main email provider as they have a free plan (for up to 100 emails).

Shpigford avatar Jan 14 '24 18:01 Shpigford

@tmyracle @sy425191 Can you guys clarify the difference in your solutions?

Shpigford avatar Jan 14 '24 20:01 Shpigford

Sure, since NX already loads are env vars from the .env I added the required Postmark env vars to the .env.example which means you shouldn't have to go in the code to mess with anything. I also removed the POSTMARK_SMTP_PASS env since it was only being used by Auth0. Loading everything into an env config and using that same config references through the app is the current convention in the codebase (ex: server env config) so I followed that path.

tmyracle avatar Jan 14 '24 21:01 tmyracle

I have added these required Postmark vars into .env.example

NX_POSTMARK_FROM_ADDRESS= 
NX_POSTMARK_REPLY_TO_ADDRESS= 
NX_POSTMARK_API_TOKEN=

and referenced them directly to root .env file wherever they are used in the codebase.

sy425191 avatar Jan 14 '24 21:01 sy425191

Closed with #59

Shpigford avatar Jan 15 '24 01:01 Shpigford