7691-testToMaster #2703
|
@ -232,5 +232,6 @@
|
||||||
"Incoterms and Customs agent are required for a non UEE member": "Incoterms and Customs agent are required for a non UEE member",
|
"Incoterms and Customs agent are required for a non UEE member": "Incoterms and Customs agent are required for a non UEE member",
|
||||||
"It has been invoiced but the PDF could not be generated": "It has been invoiced but the PDF could not be generated",
|
"It has been invoiced but the PDF could not be generated": "It has been invoiced but the PDF could not be generated",
|
||||||
"It has been invoiced but the PDF of refund not be generated": "It has been invoiced but the PDF of refund not be generated",
|
"It has been invoiced but the PDF of refund not be generated": "It has been invoiced but the PDF of refund not be generated",
|
||||||
"Cannot add holidays on this day": "Cannot add holidays on this day"
|
"Cannot add holidays on this day": "Cannot add holidays on this day",
|
||||||
}
|
"Cannot send mail": "Cannot send mail"
|
||||||
|
}
|
||||||
|
|
|
@ -365,5 +365,6 @@
|
||||||
"You can only have one PDA": "Solo puedes tener un PDA",
|
"You can only have one PDA": "Solo puedes tener un PDA",
|
||||||
"It has been invoiced but the PDF could not be generated": "Se ha facturado pero no se ha podido generar el PDF",
|
"It has been invoiced but the PDF could not be generated": "Se ha facturado pero no se ha podido generar el PDF",
|
||||||
"It has been invoiced but the PDF of refund not be generated": "Se ha facturado pero no se ha podido generar el PDF del abono",
|
"It has been invoiced but the PDF of refund not be generated": "Se ha facturado pero no se ha podido generar el PDF del abono",
|
||||||
"Payment method is required": "El método de pago es obligatorio"
|
"Payment method is required": "El método de pago es obligatorio",
|
||||||
}
|
"Cannot send mail": "Não é possível enviar o email"
|
||||||
|
}
|
||||||
|
|
|
@ -359,5 +359,6 @@
|
||||||
"Select ticket or client": "Choisissez un ticket ou un client",
|
"Select ticket or client": "Choisissez un ticket ou un client",
|
||||||
"It was not able to create the invoice": "Il n'a pas été possible de créer la facture",
|
"It was not able to create the invoice": "Il n'a pas été possible de créer la facture",
|
||||||
"It has been invoiced but the PDF could not be generated": "La facture a été émise mais le PDF n'a pas pu être généré",
|
"It has been invoiced but the PDF could not be generated": "La facture a été émise mais le PDF n'a pas pu être généré",
|
||||||
"It has been invoiced but the PDF of refund not be generated": "Il a été facturé mais le PDF de remboursement n'a pas été généré"
|
"It has been invoiced but the PDF of refund not be generated": "Il a été facturé mais le PDF de remboursement n'a pas été généré",
|
||||||
|
"Cannot send mail": "Impossible d'envoyer le mail"
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@ const path = require('path');
|
||||||
const smtp = require('./smtp');
|
const smtp = require('./smtp');
|
||||||
const Component = require('./component');
|
const Component = require('./component');
|
||||||
const Report = require('./report');
|
const Report = require('./report');
|
||||||
|
const UserError = require('vn-loopback/util/user-error');
|
||||||
|
|
||||||
if (!process.env.OPENSSL_CONF)
|
if (!process.env.OPENSSL_CONF)
|
||||||
process.env.OPENSSL_CONF = '/etc/ssl/';
|
process.env.OPENSSL_CONF = '/etc/ssl/';
|
||||||
|
@ -9,7 +10,6 @@ if (!process.env.OPENSSL_CONF)
|
||||||
class Email extends Component {
|
class Email extends Component {
|
||||||
constructor(name, args) {
|
constructor(name, args) {
|
||||||
super(name);
|
super(name);
|
||||||
|
|
||||||
this.args = args;
|
this.args = args;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,7 +88,11 @@ class Email extends Component {
|
||||||
force: options.force
|
force: options.force
|
||||||
};
|
};
|
||||||
|
|
||||||
return await smtp.send(mailOptions);
|
try {
|
||||||
|
return await smtp.send(mailOptions);
|
||||||
|
} catch (error) {
|
||||||
|
throw new UserError('Cannot send mail');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue