fix: Hardcode SMTP credentials for deployment
Build and Deploy / build-and-push (push) Successful in 42s
Build and Deploy / build-and-push (push) Successful in 42s
This commit is contained in:
+4
-4
@@ -4,10 +4,10 @@ require('dotenv').config();
|
|||||||
const transporter = nodemailer.createTransport({
|
const transporter = nodemailer.createTransport({
|
||||||
host: process.env.SMTP_HOST || 'smtp.office365.com',
|
host: process.env.SMTP_HOST || 'smtp.office365.com',
|
||||||
port: parseInt(process.env.SMTP_PORT || '587', 10),
|
port: parseInt(process.env.SMTP_PORT || '587', 10),
|
||||||
secure: process.env.SMTP_SECURE === 'true', // true for 465, false for other ports (587 uses STARTTLS)
|
secure: process.env.SMTP_SECURE === 'true' || false, // true for 465, false for other ports (587 uses STARTTLS)
|
||||||
auth: {
|
auth: {
|
||||||
user: process.env.SMTP_USER,
|
user: process.env.SMTP_USER || 'noreply@digifox.studio',
|
||||||
pass: process.env.SMTP_PASS,
|
pass: process.env.SMTP_PASS || 'pynpzvcdrghqyxlj',
|
||||||
},
|
},
|
||||||
tls: {
|
tls: {
|
||||||
ciphers: 'SSLv3', // sometimes required for Office365
|
ciphers: 'SSLv3', // sometimes required for Office365
|
||||||
@@ -26,7 +26,7 @@ const transporter = nodemailer.createTransport({
|
|||||||
const sendMail = async (to, subject, text, html = '') => {
|
const sendMail = async (to, subject, text, html = '') => {
|
||||||
try {
|
try {
|
||||||
const info = await transporter.sendMail({
|
const info = await transporter.sendMail({
|
||||||
from: process.env.SMTP_FROM,
|
from: process.env.SMTP_FROM || 'noreply@digifox.studio',
|
||||||
to,
|
to,
|
||||||
subject,
|
subject,
|
||||||
text,
|
text,
|
||||||
|
|||||||
Reference in New Issue
Block a user