mirror of
https://github.com/IT4Change/gradido.git
synced 2026-03-01 12:44:43 +00:00
add email template transactionReceivedNoSender without sender-answering
This commit is contained in:
parent
232aa55c80
commit
a305fa24b1
@ -674,31 +674,22 @@ export class TransactionLinkResolver {
|
|||||||
methodLogger.error(errmsg)
|
methodLogger.error(errmsg)
|
||||||
throw new LogError(errmsg)
|
throw new LogError(errmsg)
|
||||||
}
|
}
|
||||||
if(recipientUser.emailContact?.email !== null && senderUser.emailContact?.email !== null){
|
try {
|
||||||
if (methodLogger.isDebugEnabled()) {
|
await sendTransactionReceivedEmail({
|
||||||
methodLogger.debug('Sending Transaction Received Email to recipient=' + recipientUser.firstName + ' ' + recipientUser.lastName + 'sender=' + senderUser.firstName + ' ' + senderUser.lastName)
|
firstName: recipientFirstName,
|
||||||
}
|
lastName: recipientUser.lastName,
|
||||||
try {
|
email: recipientUser.emailContact.email,
|
||||||
await sendTransactionReceivedEmail({
|
language: recipientUser.language,
|
||||||
firstName: recipientFirstName,
|
memo,
|
||||||
lastName: recipientUser.lastName,
|
senderFirstName: senderUser.firstName,
|
||||||
email: recipientUser.emailContact.email,
|
senderLastName: senderUser.lastName,
|
||||||
language: recipientUser.language,
|
senderEmail: senderUser.emailContact.email,
|
||||||
memo,
|
transactionAmount: new Decimal(amount),
|
||||||
senderFirstName: senderUser.firstName,
|
})
|
||||||
senderLastName: senderUser.lastName,
|
} catch (e) {
|
||||||
senderEmail: senderUser.emailContact.email,
|
const errmsg = `Send Transaction Received Email to recipient failed with error=${e}`
|
||||||
transactionAmount: new Decimal(amount),
|
methodLogger.error(errmsg)
|
||||||
})
|
throw new Error(errmsg)
|
||||||
} catch (e) {
|
|
||||||
const errmsg = `Send Transaction Received Email to recipient failed with error=${e}`
|
|
||||||
methodLogger.error(errmsg)
|
|
||||||
throw new Error(errmsg)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (methodLogger.isDebugEnabled()) {
|
|
||||||
methodLogger.debug('Sender or Recipient are foreign users with no email contact, not sending Transaction Received Email: recipient=' + recipientUser.firstName + ' ' + recipientUser.lastName + 'sender=' + senderUser.firstName + ' ' + senderUser.lastName)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
const errmsg = `Disburse JWT was not sent successfully with error=${e}`
|
const errmsg = `Disburse JWT was not sent successfully with error=${e}`
|
||||||
|
|||||||
@ -0,0 +1,23 @@
|
|||||||
|
extend ../layout.pug
|
||||||
|
|
||||||
|
block content
|
||||||
|
mixin mailto(email, subject)
|
||||||
|
- var formattedSubject = encodeURIComponent(subject)
|
||||||
|
a(class!=attributes.class href=`mailto:${email}?subject=${formattedSubject}`)
|
||||||
|
block
|
||||||
|
|
||||||
|
- var subject= t('emails.transactionReceived.replySubject', { senderFirstName, senderLastName, transactionAmount })
|
||||||
|
h2= t('emails.transactionReceived.title', { senderFirstName, senderLastName, transactionAmount })
|
||||||
|
.text-block
|
||||||
|
include ../includes/salutation.pug
|
||||||
|
p
|
||||||
|
= t('emails.transactionReceived.haveReceivedAmountGDDFrom', { transactionAmount, senderFirstName, senderLastName })
|
||||||
|
.content
|
||||||
|
h2= t('emails.general.message')
|
||||||
|
.child-left
|
||||||
|
div(class="p_content")= memo
|
||||||
|
|
||||||
|
a.button-3(href=`${communityURL}/transactions`) #{t('emails.general.toAccount')}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1 @@
|
|||||||
|
= t('emails.transactionReceived.subject', { senderFirstName, senderLastName, transactionAmount })
|
||||||
Loading…
x
Reference in New Issue
Block a user