Skip to content

Commit

Permalink
feat: use ses as production email provider (#334)
Browse files Browse the repository at this point in the history
  • Loading branch information
ojeytonwilliams authored Nov 29, 2023
1 parent 2f7c227 commit 8d1a173
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
16 changes: 8 additions & 8 deletions apps/backend/config/env/production/plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ module.exports = ({ env }) => ({
config: {
provider: "nodemailer",
providerOptions: {
host: env("NODEMAILER_HOST", "localhost"),
secure: false,
port: 1025,
host: env("AWS_SES_HOST"),
secure: true,
port: 465,
auth: {
user: "test",
pass: "test",
},
tls: {
rejectUnauthorized: false,
user: env("AWS_SES_KEY"),
pass: env("AWS_SES_SECRET"),
},
},
settings: {
defaultFrom: "[email protected]",
},
},
},
});
8 changes: 7 additions & 1 deletion apps/backend/sample.env
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,14 @@ DATABASE_SSL_CA=
# Environment
NODE_ENV=development

# URL of the frontend app:
DASHBOARD_URL=http://localhost:3000

# Email
DASHBOARD_URL=http://localhost:3000 # URL of the frontend app
# Required in production:
AWS_SES_KEY=
AWS_SES_SECRET=
AWS_SES_HOST=

# Data migration
DATA_MIGRATION=false

0 comments on commit 8d1a173

Please sign in to comment.