53 lines
2.6 KiB
TypeScript
53 lines
2.6 KiB
TypeScript
/**
|
||
* Default invoice email templates per language. Used when the user hasn't
|
||
* customised them in settings. Variables ({{invoiceNumber}}, etc.) are
|
||
* substituted by `renderTemplate` at send time.
|
||
*
|
||
* The shop logo is rendered as an inline attachment with content-id
|
||
* `invoice-logo`; the email sender attaches the logo bytes automatically
|
||
* when the template (or any custom template) references that cid.
|
||
*/
|
||
|
||
const DE_HTML = `\
|
||
<h2 style="margin:0 0 8px;font-family:Arial,Helvetica,sans-serif;"><span style="color:#0883DA">{{companyName}}</span></h2>
|
||
<h3 style="margin:0 0 16px;font-family:Arial,Helvetica,sans-serif;"><span style="color:#0883DA">Danke für deinen Einkauf!</span></h3>
|
||
<p style="font-family:Arial,Helvetica,sans-serif;font-size:14px;line-height:1.5;">
|
||
Die Rechnung befindet sich im Anhang.
|
||
</p>
|
||
<p style="font-family:Arial,Helvetica,sans-serif;font-size:14px;line-height:1.5;">
|
||
Bei Überweisung bitte die Rechnungs-Nummer als Referenz verwenden:
|
||
<strong>{{invoiceNumber}}</strong><br>
|
||
Besten Dank!
|
||
</p>
|
||
<p style="margin-top:24px;">
|
||
<img src="cid:invoice-logo" alt="{{companyName}}" style="max-height:48px;">
|
||
</p>
|
||
<p style="font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:1.6;color:#0883DA;">
|
||
✉ <a href="mailto:{{shopEmail}}" style="color:#0883DA;">Kontakt</a><br>
|
||
🌐 <a href="{{shopWebsite}}" style="color:#0883DA;">{{shopWebsite}}</a>
|
||
</p>`;
|
||
|
||
const EN_HTML = `\
|
||
<h2 style="margin:0 0 8px;font-family:Arial,Helvetica,sans-serif;"><span style="color:#0883DA">{{companyName}}</span></h2>
|
||
<h3 style="margin:0 0 16px;font-family:Arial,Helvetica,sans-serif;"><span style="color:#0883DA">Thank you for your purchase!</span></h3>
|
||
<p style="font-family:Arial,Helvetica,sans-serif;font-size:14px;line-height:1.5;">
|
||
Please find the invoice attached.
|
||
</p>
|
||
<p style="font-family:Arial,Helvetica,sans-serif;font-size:14px;line-height:1.5;">
|
||
When paying by bank transfer, please use the invoice number as the reference:
|
||
<strong>{{invoiceNumber}}</strong><br>
|
||
Thanks a lot!
|
||
</p>
|
||
<p style="margin-top:24px;">
|
||
<img src="cid:invoice-logo" alt="{{companyName}}" style="max-height:48px;">
|
||
</p>
|
||
<p style="font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:1.6;color:#0883DA;">
|
||
✉ <a href="mailto:{{shopEmail}}" style="color:#0883DA;">Contact</a><br>
|
||
🌐 <a href="{{shopWebsite}}" style="color:#0883DA;">{{shopWebsite}}</a>
|
||
</p>`;
|
||
|
||
export const DEFAULT_EMAIL_SUBJECT_DE = "Rechnung {{invoiceNumber}} – {{companyName}}";
|
||
export const DEFAULT_EMAIL_SUBJECT_EN = "Invoice {{invoiceNumber}} – {{companyName}}";
|
||
export const DEFAULT_EMAIL_BODY_DE = DE_HTML;
|
||
export const DEFAULT_EMAIL_BODY_EN = EN_HTML;
|