fix #2
@ -9,6 +9,7 @@ ADMIN_EMAIL=a@ga1maz.ru # Email администратора для
|
||||
# === SMTP настройки ===
|
||||
SMTP_HOST=smtp.gmail.com # SMTP сервер
|
||||
SMTP_PORT=587 # SMTP порт (обычно 587 или 465)
|
||||
SMTP_SECURE=false # true для 465, false для 587
|
||||
SMTP_USER=noreply@example.com # Email для отправки
|
||||
SMTP_PASS=app_password # Пароль приложения для email
|
||||
SMTP_MAIL_FROM=noreply@example.com # Email отправителя
|
||||
|
||||
@ -37,6 +37,7 @@ APPNAME=Название проекта
|
||||
ADMIN_EMAIL=admin@example.com
|
||||
SMTP_HOST=smtp.example.com
|
||||
SMTP_PORT=587
|
||||
SMTP_SECURE=false
|
||||
SMTP_USER=noreply@example.com
|
||||
SMTP_PASS=email_app_password
|
||||
SMTP_MAIL_FROM=noreply@example.com
|
||||
|
||||
@ -23,11 +23,15 @@ const FNS_TIMEOUT_MS = Number(process.env.FNS_TIMEOUT_MS || 30000);
|
||||
const SMTP_TIMEOUT_MS = Number(process.env.SMTP_TIMEOUT_MS || 15000);
|
||||
const ERROR_FILE = path.join(__dirname, "error.json");
|
||||
const ADMIN_EMAIL = process.env.ADMIN_EMAIL;
|
||||
const SMTP_PORT = Number(process.env.SMTP_PORT || 587);
|
||||
const SMTP_SECURE = process.env.SMTP_SECURE
|
||||
? process.env.SMTP_SECURE === "true"
|
||||
: SMTP_PORT === 465;
|
||||
|
||||
const transporter = nodemailer.createTransport({
|
||||
host: process.env.SMTP_HOST,
|
||||
port: Number(process.env.SMTP_PORT),
|
||||
secure: false,
|
||||
port: SMTP_PORT,
|
||||
secure: SMTP_SECURE,
|
||||
auth: {
|
||||
user: process.env.SMTP_USER,
|
||||
pass: process.env.SMTP_PASS
|
||||
|
||||
Loading…
Reference in New Issue
Block a user