Skip to content

Commit

Permalink
alterando host do email
Browse files Browse the repository at this point in the history
  • Loading branch information
jesielviana committed May 24, 2023
1 parent daa64cb commit a26447e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
3 changes: 1 addition & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ MAIL_SENDER=""
MAIL_PASSWORD=""
MAIL_PORT=587
MAIL_HOST=""
MAIL_RECIPIENT="[email protected]"
MAIL_HOST_IP=""
MAIL_RECIPIENT="[email protected]"
1 change: 0 additions & 1 deletion .github/workflows/deploy-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ env:
MAIL_PASSWORD: ${{secrets.MAIL_PASSWORD}}
MAIL_PORT: ${{secrets.MAIL_PORT}}
MAIL_RECIPIENT: ${{secrets.MAIL_RECIPIENT}}
MAIL_HOST_IP: ${{secrets.MAIL_HOST_IP}}

jobs:
test:
Expand Down
4 changes: 1 addition & 3 deletions src/pages/api/mail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ const proxy = async (req: any, res: any) => {
const MAILSENDER = process.env.MAIL_SENDER
const PASSWORD = process.env.MAIL_PASSWORD
const MAILRECIPIENT = process.env.MAIL_RECIPIENT
const MAILHOSTIP = process.env.MAIL_HOST_IP

if (!MAILPORT || !MAILHOST || !MAILSENDER || !PASSWORD || !MAILRECIPIENT) {
// Trate o caso em que as variáveis de ambiente estão faltando ou são undefined
Expand All @@ -25,8 +24,7 @@ const proxy = async (req: any, res: any) => {
pass: PASSWORD,
},
tls: {
rejectUnauthorized: false,
servername: MAILHOSTIP,
rejectUnauthorized: false, // quando resolver o problema de DNS remover esta configuração
},
logger: true,
debug: true,
Expand Down

0 comments on commit a26447e

Please sign in to comment.