mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-08-01 19:50:37 +00:00
feat(emails): allow variables to be passed to emails
This commit is contained in:
parent
114cbe2760
commit
beea956d77
1 changed files with 3 additions and 2 deletions
|
|
@ -34,7 +34,7 @@ function getMailingInfo(user) {
|
|||
return {email: email, name: name};
|
||||
}
|
||||
|
||||
module.exports.txnEmail= function(mailingInfo, emailType){
|
||||
module.exports.txnEmail = function(mailingInfo, emailType, variables){
|
||||
if (mailingInfo._id) mailingInfo = getMailingInfo(mailingInfo);
|
||||
if (!mailingInfo.email) return;
|
||||
request({
|
||||
|
|
@ -51,7 +51,8 @@ module.exports.txnEmail= function(mailingInfo, emailType){
|
|||
to: {
|
||||
name: mailingInfo.name,
|
||||
email: mailingInfo.email
|
||||
}
|
||||
},
|
||||
variables: variables
|
||||
},
|
||||
options: {
|
||||
attemps: 5,
|
||||
|
|
|
|||
Loading…
Reference in a new issue