Skip to content

Commit

Permalink
Merge pull request #266 from ungdev/dev
Browse files Browse the repository at this point in the history
Merge master
  • Loading branch information
Suboyyy authored Nov 27, 2024
2 parents 0dc5962 + dee4034 commit 3b06c18
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 11 deletions.
2 changes: 0 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ EMAIL_PORT=
EMAIL_SECURE=
EMAIL_SENDER_NAME=
EMAIL_SENDER_ADDRESS=
EMAIL_AUTH_USER=
EMAIL_AUTH_PASSWORD=
EMAIL_REJECT_UNAUTHORIZED=

# Used to give a discount on tickets
Expand Down
7 changes: 2 additions & 5 deletions src/services/email/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,6 @@ const emailOptions = {
host: env.email.host,
port: env.email.port,
secure: env.email.secure,
auth: {
user: env.email.auth.user,
pass: env.email.auth.password,
},
tls: {
rejectUnauthorized: env.email.rejectUnauthorized,
},
Expand Down Expand Up @@ -117,8 +113,9 @@ export const sendEmail = async (mail: SerializedMail, attachments?: EmailAttache
});

logger.info(`Email sent to ${mail.to}`);
} catch {
} catch (error) {
logger.warn(`Could not send email to ${mail.to}`);
logger.error(error);
}
};

Expand Down
4 changes: 0 additions & 4 deletions src/utils/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,6 @@ const env = {
name: loadEnv('EMAIL_SENDER_NAME') || 'UTT Arena',
address: loadEnv('EMAIL_SENDER_ADDRESS') || '[email protected]',
},
auth: {
user: loadEnv('EMAIL_AUTH_USER'),
password: loadEnv('EMAIL_AUTH_PASSWORD'),
},
rejectUnauthorized: loadEnv('EMAIL_REJECT_UNAUTHORIZED') !== 'false',
maxMailsPerBatch: loadIntEnv('MAX_MAIL_PER_BATCH') || 100,
partners: loadEnv('PARTNER_MAILS')?.split(',') || [],
Expand Down

0 comments on commit 3b06c18

Please sign in to comment.