setup GMAIL email smtp transport
This commit is contained in:
4
.env
4
.env
@ -61,8 +61,8 @@ MAILERSEND_PORT=587
|
|||||||
MAILERSEND_USER=MS_bL93ka@mwitnessing.com
|
MAILERSEND_USER=MS_bL93ka@mwitnessing.com
|
||||||
MAILERSEND_PASS=v23Z2XrDSNjHJxgo
|
MAILERSEND_PASS=v23Z2XrDSNjHJxgo
|
||||||
|
|
||||||
GMAIL_EMAIL_USERNAME=
|
EMAIL_GMAIL_USERNAME=mwitnessing
|
||||||
GMAIL_EMAIL_APP_PASS=
|
EMAIL_GMAIL_PASS=N5jkpvAYLMCmUu
|
||||||
|
|
||||||
TELEGRAM_BOT=false
|
TELEGRAM_BOT=false
|
||||||
TELEGRAM_BOT_TOKEN=7050075088:AAH6VRpNCyQd9x9sW6CLm6q0q4ibUgYBfnM
|
TELEGRAM_BOT_TOKEN=7050075088:AAH6VRpNCyQd9x9sW6CLm6q0q4ibUgYBfnM
|
||||||
|
@ -25,8 +25,8 @@ let mailtrapTestClient = null;
|
|||||||
// password: 'c7bc05f171c96c'
|
// password: 'c7bc05f171c96c'
|
||||||
// });
|
// });
|
||||||
|
|
||||||
//PROD MAILTRAP
|
//MAILTRAP
|
||||||
var transporter = nodemailer.createTransport({
|
var transporterMT = nodemailer.createTransport({
|
||||||
host: process.env.MAILTRAP_HOST || "sandbox.smtp.mailtrap.io",
|
host: process.env.MAILTRAP_HOST || "sandbox.smtp.mailtrap.io",
|
||||||
port: 2525,
|
port: 2525,
|
||||||
auth: {
|
auth: {
|
||||||
@ -35,6 +35,33 @@ var transporter = nodemailer.createTransport({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//PROD GMAIL
|
||||||
|
// const oauth2Client = new OAuth2(
|
||||||
|
// process.env.CLIENT_ID,
|
||||||
|
// process.env.CLIENT_SECRET,
|
||||||
|
// "https://developers.google.com/oauthplayground"
|
||||||
|
// );
|
||||||
|
// var transporterGmail = nodemailer.createTransport({
|
||||||
|
// service: "gmail",
|
||||||
|
// auth: {
|
||||||
|
// type: "OAuth2",
|
||||||
|
// user: process.env.GMAIL_USER,
|
||||||
|
// clientId: process.env.CLIENT_ID,
|
||||||
|
// clientSecret: process.env.CLIENT_SECRET,
|
||||||
|
// refreshToken: process.env.REFRESH_TOKEN,
|
||||||
|
// accessToken: process.env.ACCESS_TOKEN
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
//--------------
|
||||||
|
var transporter = nodemailer.createTransport({
|
||||||
|
service: "gmail",
|
||||||
|
auth: {
|
||||||
|
user: process.env.EMAIL_GMAIL_USERNAME,
|
||||||
|
pass: process.env.EMAIL_GMAIL_PASS
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
//PROD MAILERSEND
|
//PROD MAILERSEND
|
||||||
// var transporter = nodemailer.createTransport({
|
// var transporter = nodemailer.createTransport({
|
||||||
// host: process.env.MAILERSEND_SERVER,
|
// host: process.env.MAILERSEND_SERVER,
|
||||||
@ -53,6 +80,10 @@ var transporterBulk = nodemailer.createTransport({
|
|||||||
pass: "1cfe82e747b8dc3390ed08bb16e0f48d"
|
pass: "1cfe82e747b8dc3390ed08bb16e0f48d"
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// ------------------ Email sending ------------------
|
// ------------------ Email sending ------------------
|
||||||
var lastResult = null;
|
var lastResult = null;
|
||||||
function setResult(result) {
|
function setResult(result) {
|
||||||
|
@ -31,7 +31,8 @@
|
|||||||
"pages/cart/locations/[id].tsx.typed",
|
"pages/cart/locations/[id].tsx.typed",
|
||||||
"components/location/LocationForm.js",
|
"components/location/LocationForm.js",
|
||||||
"pages/cart/locations/[id].tsx.old",
|
"pages/cart/locations/[id].tsx.old",
|
||||||
"components/publisher/ShiftsList.js"
|
"components/publisher/ShiftsList.js",
|
||||||
|
"src/helpers/data.js"
|
||||||
],
|
],
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"node_modules"
|
"node_modules"
|
||||||
|
Reference in New Issue
Block a user