more gmail setup

This commit is contained in:
Dobromir Popov
2024-04-13 19:09:40 +03:00
parent 0360ad4809
commit 0a51e8f70d
4 changed files with 5 additions and 4 deletions

2
.env
View File

@ -62,7 +62,7 @@ MAILERSEND_USER=MS_bL93ka@mwitnessing.com
MAILERSEND_PASS=v23Z2XrDSNjHJxgo MAILERSEND_PASS=v23Z2XrDSNjHJxgo
EMAIL_GMAIL_USERNAME=mwitnessing EMAIL_GMAIL_USERNAME=mwitnessing
EMAIL_GMAIL_PASS=N5jkpvAYLMCmUu EMAIL_GMAIL_APP_PASS="acys uzsp eere qzyh"
TELEGRAM_BOT=false TELEGRAM_BOT=false
TELEGRAM_BOT_TOKEN=7050075088:AAH6VRpNCyQd9x9sW6CLm6q0q4ibUgYBfnM TELEGRAM_BOT_TOKEN=7050075088:AAH6VRpNCyQd9x9sW6CLm6q0q4ibUgYBfnM

BIN
mwitnessing_totp_setup.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -269,9 +269,10 @@ export default async function handler(req, res) {
let pubsToSend = subscribedPublishers.concat(availablePublishers). let pubsToSend = subscribedPublishers.concat(availablePublishers).
filter((item, index, self) => filter((item, index, self) =>
index === self.findIndex((t) => ( index === self.findIndex((t) => (
t.email === item.email t.email === item.email //and exclude the user himself
)) )) //&& item.email !== user.email
); );
console.log("Sending CoverMe request to " + pubsToSend.length + " publishers");
//send email to all subscribed publishers //send email to all subscribed publishers
for (let i = 0; i < pubsToSend.length; i++) { for (let i = 0; i < pubsToSend.length; i++) {

View File

@ -57,7 +57,7 @@ var transporter = nodemailer.createTransport({
service: "gmail", service: "gmail",
auth: { auth: {
user: process.env.EMAIL_GMAIL_USERNAME, user: process.env.EMAIL_GMAIL_USERNAME,
pass: process.env.EMAIL_GMAIL_PASS pass: process.env.EMAIL_GMAIL_APP_PASS
} }
}); });