This commit is contained in:
Sergey Yarkov 2020-01-19 21:41:29 +03:00
parent 54f9bc9a61
commit b32656e675
4 changed files with 10 additions and 10 deletions

View File

@ -34,14 +34,14 @@ module.exports = function(server, db, qiwiApi) {
db.collection('buyers').insertOne({bill_id, email, method, date, amount, data: result}); db.collection('buyers').insertOne({bill_id, email, method, date, amount, data: result});
await nodemailer.transporter.sendMail({ await nodemailer.transporter.sendMail({
from: `"Оплата аккаунта." <${process.env.EMAIL_LOGIN}>`, // sender address from: `"Оплата аккаунта." <${process.env.EMAIL_LOGIN}>`,
to: email, // list of receivers to: email,
subject: "Оплата успешно проведена.", // subject subject: "Оплата успешно проведена.",
text: "Данные купленного товара находятся в этом письме.", // plain text body text: "Данные купленного товара находятся в этом письме.",
html: `<b>Номер заказа: ${bill_id}</b><br> html: `<b>Номер заказа: ${bill_id}</b><br>
<b>Данные товара:</b><br> <b>Данные товара:</b><br>
<p>${result.join('<br>')}</p> <p>${result.join('<br>')}</p>
` // html body `
}); });
res.render('main/success', {result, email}); res.render('main/success', {result, email});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -22,7 +22,7 @@ export class OrdersComponent extends Component {
this.notification.notificate(`Данные были успешно высланы на почту "${email}".`, '#26A69A', 3500); this.notification.notificate(`Данные были успешно высланы на почту "${email}".`, '#26A69A', 3500);
break; break;
case 'NF': case 'NF':
this.notification.notificate(`Покупатель с почтой ${email} не был найден.`, '#f44336', 3500); this.notification.notificate(`Покупатель с почтой "${email}" не был найден.`, '#f44336', 3500);
break; break;
case 'ERR': case 'ERR':
this.notification.notificate(`Произошла ошибка, попробуйте повторить запрос позже.`, '#f44336', 3500); this.notification.notificate(`Произошла ошибка, попробуйте повторить запрос позже.`, '#f44336', 3500);