Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
<tr>
<td align="left" style="padding-bottom: 22px; text-align: left;">
{{#if siteIconUrl}}
<a href="{{siteUrl}}"><img src="{{siteIconUrl}}" alt="{{siteTitle}}" border="0" width="48" height="48" style="border-radius: 4px;"></a>
<img src="{{siteIconUrl}}" alt="{{siteTitle}}" border="0" width="48" height="48" style="border-radius: 4px;">
{{else}}
<a href="{{siteUrl}}" style="font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 17px; font-weight: 700; color: {{accentColor}}; text-decoration: none;">{{siteTitle}}</a>
<span style="font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 17px; font-weight: 700; color: {{accentColor}};">{{siteTitle}}</span>
{{/if}}
</td>
</tr>
Expand Down Expand Up @@ -92,7 +92,7 @@
</tr>
<tr>
<td style="font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 14px; vertical-align: top; padding-top: 40px;">
<p class="small" style="font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; line-height: 16px; font-size: 11px; color: #738A94; font-weight: normal; margin: 0;">{{t 'This message was sent from {siteDomain} to {email} on behalf of {buyerName} ({buyerEmail}).' siteDomain=(linkTag siteUrl siteDomain class="small" style="text-decoration: underline; color: #738A94; font-size: 11px;") email=(linkTag (mailto toEmail) toEmail class="small" style="text-decoration: underline; color: #738A94; font-size: 11px;") buyerName=buyerName buyerEmail=(linkTag (mailto buyerEmail) buyerEmail class="small" style="text-decoration: underline; color: #738A94; font-size: 11px;")}}</p>
<p class="small" style="font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; line-height: 16px; font-size: 11px; color: #738A94; font-weight: normal; margin: 0;">{{t 'This message was sent from {siteDomain} to {email} on behalf of {buyerName} ({buyerEmail}).' siteDomain=siteDomain email=toEmail buyerName=buyerName buyerEmail=buyerEmail}}</p>
</td>
</tr>
</table>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import type { Translate } from '../gift-email-renderer';

export interface GiftDeliveryEmailData {
siteTitle: string;
siteUrl: string;
siteIconUrl: string | null;
siteDomain: string;
accentColor: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,6 @@ export class GiftEmailService {
const giftLink = `${siteUrl.replace(/\/$/, '')}/gift/${token}`;
const { html, text } = await this.renderer.renderDelivery({
siteTitle,
siteUrl,
siteIconUrl: this.blogIcon.getIconUrl({ absolute: true, fallbackToDefault: false }),
siteDomain,
accentColor: this.accentColor,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,9 @@ describe('GiftEmailService', function () {
);
sinon.assert.match(
message.html,
sinon.match(/on behalf of Buyer \(<a[^>]+href="mailto:buyer@example\.com"/),
sinon.match(
'This message was sent from example.com to recipient@example.com on behalf of Buyer (buyer@example.com).',
),
);
sinon.assert.match(message.html, sinon.match('background:#fff3ed'));
sinon.assert.match(message.html, sinon.match('color:#bd460c'));
Expand Down Expand Up @@ -424,7 +426,7 @@ describe('GiftEmailService', function () {
});

const html = bulkMailer.send.firstCall.firstArg.html;
assert.match(html, /<a href="https:\/\/example\.com\/"[^>]*>Test Site<\/a>/);
assert.match(html, /<span[^>]*>Test Site<\/span>/);
assert.doesNotMatch(html, /<img /);
});

Expand Down
Loading