Notification: Set a new Friendship and Accepted Friendship
This commit is contained in:
@@ -446,6 +446,35 @@ module.exports = {
|
||||
// this.sendEmail_base('admin/sendmsg/' + lang, tools.getAdminEmailByIdApp(idapp), mylocalsconf);
|
||||
},
|
||||
|
||||
sendEmail_ByNotif: async function (lang, emailto, user, idapp, recnotif) {
|
||||
|
||||
tools.mylog('sendEmail_ByNotif');
|
||||
|
||||
let mylocalsconf = {
|
||||
idapp,
|
||||
dataemail: await this.getdataemail(idapp),
|
||||
locale: lang,
|
||||
nomeapp: tools.getNomeAppByIdApp(idapp),
|
||||
usernameorig: user.name + ' ' + user.surname,
|
||||
};
|
||||
|
||||
mylocalsconf = this.setParamsForTemplate(user, mylocalsconf);
|
||||
mylocalsconf.emailto = emailto;
|
||||
|
||||
mylocalsconf.dataemail.emailtitle = recnotif.title;
|
||||
mylocalsconf.dataemail.emailbody = tools.getTextNotifByRecNotif(recnotif);
|
||||
|
||||
if (!!mylocalsconf.dataemail.emailtitle && !!mylocalsconf.dataemail.emailbody) {
|
||||
const replyto = tools.getreplyToEmailByIdApp(idapp);
|
||||
|
||||
//return this.sendEmail_base('standard', emailto, mylocalsconf, replyto);
|
||||
return await this.sendEmail_Normale(emailto, mylocalsconf.dataemail.emailtitle, mylocalsconf.dataemail.emailbody, replyto);
|
||||
}
|
||||
|
||||
// Send Email also to the Admin
|
||||
// this.sendEmail_base('admin/sendmsg/' + lang, tools.getAdminEmailByIdApp(idapp), mylocalsconf);
|
||||
},
|
||||
|
||||
Add_to_MailingList_AndSendEmailNotify: async function (lang, user, idapp, sendnews) {
|
||||
|
||||
// console.log('idapp', idapp, tools.getNomeAppByIdApp(idapp));
|
||||
|
||||
Reference in New Issue
Block a user