diff --git a/.env.template b/.env.template index 1b9a45df..1e5d5784 100644 --- a/.env.template +++ b/.env.template @@ -16,3 +16,5 @@ SESSION_SECRET_KEY=generate_on_https://randomkeygen.com SMTP_HOST=smtp.gmail.com SMTP_PASSWORD=your_password SMTP_PORT=587 + +CONTACT_MAIL=contact@example.com \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7314afa4..f0ac1038 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -42,6 +42,7 @@ jobs: uses: SpicyPizza/create-envfile@v1 with: envkey_NODE_ENV: production + envkey_CONTACT_MAIL: ${{ secrets.CONTACT_MAIL }} envkey_DATABASE_URL: ${{ secrets.DATABASE_URL }} envkey_SESSION_SECRET_KEY: ${{ secrets.SESSION_SECRET_KEY }} envkey_LYF_API_VENDOR_ID: ${{ secrets.LYF_API_VENDOR_ID }} diff --git a/app/entities/users/mutations/contact.ts b/app/entities/users/mutations/contact.ts index d691ae08..ef46339d 100644 --- a/app/entities/users/mutations/contact.ts +++ b/app/entities/users/mutations/contact.ts @@ -12,7 +12,7 @@ export default resolver.pipe(async ({ subject, message, email }: ContactInput) = try { await mail.send({ subject, - to: `${process.env.NODE_ENV !== 'production' ? 'bde.isima' : 'bde.isima.webmaster'}+contact@gmail.com`, + to: `${process.env.CONTACT_MAIL}`, view: 'contact', variables: { subject,