mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
feat: unsubscribe link to user profile (#8637)
This commit is contained in:
parent
08d0e45de5
commit
6f09bcdee1
@ -169,8 +169,11 @@ test('Can send productivity report email', async () => {
|
||||
health: 99,
|
||||
},
|
||||
);
|
||||
console.log(content);
|
||||
expect(content.from).toBe('noreply@getunleash.ai');
|
||||
expect(content.subject).toBe('Unleash - productivity report');
|
||||
expect(content.html.includes(`Productivity Report`)).toBe(true);
|
||||
expect(content.html.includes(`localhost/insights`)).toBe(true);
|
||||
expect(content.html.includes(`localhost/profile`)).toBe(true);
|
||||
expect(content.text.includes(`localhost/insights`)).toBe(true);
|
||||
expect(content.text.includes(`localhost/profile`)).toBe(true);
|
||||
});
|
||||
|
@ -537,14 +537,11 @@ export class EmailService {
|
||||
},
|
||||
): Promise<IEmailEnvelope> {
|
||||
if (this.configured()) {
|
||||
const unsubscribeUrl = '{{amazonSESUnsubscribeUrl}}'; // FIXME: Add unsubscribe URL
|
||||
|
||||
const context = {
|
||||
userName,
|
||||
userEmail,
|
||||
...metrics,
|
||||
unleashUrl: this.config.server.unleashUrl,
|
||||
unsubscribeUrl,
|
||||
};
|
||||
|
||||
const template = 'productivity-report';
|
||||
|
@ -72,9 +72,7 @@
|
||||
</div>
|
||||
<div class="unsubscribe" style="font-size: 12px;color: #888;margin-top: 10px;">
|
||||
This email was sent to {{userEmail}}. You’ve received this as you are a user of Unleash.<br>
|
||||
{{#unsubscribeUrl}}
|
||||
If you wish to unsubscribe, click <a href="{{unsubscribeUrl}}">here</a>.
|
||||
{{/unsubscribeUrl}}
|
||||
If you wish to unsubscribe, go to you profile settings <a href="{{unleashUrl}}/profile">here</a>.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -14,6 +14,4 @@ Production updates last month: {{productionUpdates}}
|
||||
Go to your Insights to learn more: {{unleashUrl}}/insights
|
||||
|
||||
This email was sent to {{userEmail}}. You’ve received this as you are a user of Unleash.
|
||||
{{#unsubscribeUrl}}
|
||||
If you wish to unsubscribe, click <a href="{{unsubscribeUrl}}">here</a>.
|
||||
{{/unsubscribeUrl}}
|
||||
If you wish to unsubscribe, go to you profile settings <a href="{{unleashUrl}}/profile">here</a>.
|
||||
|
Loading…
Reference in New Issue
Block a user