Skip to content

Commit

Permalink
Allow custom mail provider
Browse files Browse the repository at this point in the history
  • Loading branch information
citorva committed Jan 12, 2024
1 parent 1b853be commit 317e6d0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .env.template
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ LYF_FROM_APPLICATION_API_URL=https://sandbox-webpos.lyf.eu/fr/plugin/Payment.asp

SESSION_SECRET_KEY=generate_on_https://randomkeygen.com

SMTP_EMAIL=bde.isima.webmaster@gmail.com
SMTP_USER=bde.isima.webmaster
SMTP_HOST=smtp.gmail.com
SMTP_PASSWORD=your_password
SMTP_PORT=587
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ jobs:
envkey_LYF_CREDIT_CARD_API_URL: ${{ secrets.LYF_CREDIT_CARD_API_URL }}
envkey_NEXT_PUBLIC_FRONTEND_URL: ${{ secrets.NEXT_PUBLIC_FRONTEND_URL }}
envkey_NEXT_PUBLIC_GA_TRACKING_ID: ${{ secrets.NEXT_PUBLIC_GA_TRACKING_ID }}
envkey_SMTP_EMAIL: bde.isima.webmaster@gmail.com
envkey_SMTP_USER: bde.isima.webmaster
envkey_SMTP_HOST: ${{ secrets.SMTP_HOST }}
envkey_SMTP_PORT: ${{ secrets.SMTP_PORT }}
envkey_SMTP_PASSWORD: ${{ secrets.SMTP_PASSWORD }}
Expand Down
4 changes: 2 additions & 2 deletions mail/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const mail = {
host: process.env.SMTP_HOST,
port: Number(process.env.SMTP_PORT),
auth: {
user: 'bde.isima.webmaster@gmail.com',
user: process.env.SMTP_USER,
pass: process.env.SMTP_PASSWORD
}
};
Expand All @@ -26,7 +26,7 @@ export const mail = {
try {
return mailTransport.sendMail({
to,
from: 'bde.isima.webmaster@gmail.com',
from: process.env.SMTP_EMAIL,
subject,
html: compileView({
subject,
Expand Down

0 comments on commit 317e6d0

Please sign in to comment.