mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-30 11:54:33 +03:00
Fixed unsubscribe url for preview email
This commit is contained in:
parent
4b24780ebd
commit
7b89cd445a
@ -27,7 +27,10 @@ module.exports = {
|
||||
const messageToSend = Object.assign({}, message, {
|
||||
to: recipient
|
||||
});
|
||||
const unsubscribeUrl = recipientData[recipient].unsubscribe_url;
|
||||
let unsubscribeUrl = '';
|
||||
if (recipientData && recipientData[recipient]) {
|
||||
unsubscribeUrl = recipientData[recipient].unsubscribe_url;
|
||||
}
|
||||
messageToSend.html = messageToSend.html.replace('%recipient.unsubscribe_url%', unsubscribeUrl);
|
||||
try {
|
||||
await ghostMailer.send(messageToSend);
|
||||
|
Loading…
Reference in New Issue
Block a user