From 4c8b924f3fbb58943ae1f77c30e5e858c06b3459 Mon Sep 17 00:00:00 2001 From: Boyan Tabakov Date: Tue, 19 Dec 2017 15:25:12 +0200 Subject: [PATCH 1/2] Add all default mail templates Each mail template has three corresponding files, each containing respectively the subject template, the plain text mail template and the html mail template. --- .../booking-request-accepted-html.html | 47 ++++++++++++++++ .../booking-request-accepted-subject.txt | 1 + .../booking-request-accepted-text.txt | 27 ++++++++++ .../booking-request-auto-declined-html.html | 16 ++++++ .../booking-request-auto-declined-subject.txt | 1 + .../booking-request-auto-declined-text.txt | 12 +++++ .../booking-request-declined-html.html | 16 ++++++ .../booking-request-declined-subject.txt | 1 + .../booking-request-declined-text.txt | 12 +++++ .../email-changed/email-changed-html.html | 11 ++++ .../email-changed/email-changed-subject.txt | 1 + .../email-changed/email-changed-text.txt | 8 +++ .../money-paid/money-paid-html.html | 52 ++++++++++++++++++ .../money-paid/money-paid-subject.txt | 1 + .../money-paid/money-paid-text.txt | 29 ++++++++++ .../new-booking-request-html.html | 54 +++++++++++++++++++ .../new-booking-request-subject.txt | 1 + .../new-booking-request-text.txt | 32 +++++++++++ .../new-message/new-message-html.html | 19 +++++++ .../new-message/new-message-subject.txt | 1 + .../new-message/new-message-text.txt | 15 ++++++ .../password-changed-html.html | 11 ++++ .../password-changed-subject.txt | 1 + .../password-changed-text.txt | 8 +++ .../reset-password/reset-password-html.html | 15 ++++++ .../reset-password/reset-password-subject.txt | 1 + .../reset-password/reset-password-text.txt | 12 +++++ .../review-by-customer-wanted-html.html | 11 ++++ .../review-by-customer-wanted-subject.txt | 1 + .../review-by-customer-wanted-text.txt | 9 ++++ .../review-by-other-party-published-html.html | 19 +++++++ ...eview-by-other-party-published-subject.txt | 1 + .../review-by-other-party-published-text.txt | 14 +++++ ...eview-by-other-party-unpublished-html.html | 13 +++++ ...iew-by-other-party-unpublished-subject.txt | 1 + ...review-by-other-party-unpublished-text.txt | 10 ++++ .../review-by-provider-wanted-html.html | 11 ++++ .../review-by-provider-wanted-subject.txt | 1 + .../review-by-provider-wanted-text.txt | 9 ++++ .../verify-changed-email-address-html.html | 15 ++++++ .../verify-changed-email-address-subject.txt | 1 + .../verify-changed-email-address-text.txt | 12 +++++ .../verify-email-address-html.html | 15 ++++++ .../verify-email-address-subject.txt | 1 + .../verify-email-address-text.txt | 12 +++++ 45 files changed, 561 insertions(+) create mode 100644 ext/mail-templates/booking-request-accepted/booking-request-accepted-html.html create mode 100644 ext/mail-templates/booking-request-accepted/booking-request-accepted-subject.txt create mode 100644 ext/mail-templates/booking-request-accepted/booking-request-accepted-text.txt create mode 100644 ext/mail-templates/booking-request-auto-declined/booking-request-auto-declined-html.html create mode 100644 ext/mail-templates/booking-request-auto-declined/booking-request-auto-declined-subject.txt create mode 100644 ext/mail-templates/booking-request-auto-declined/booking-request-auto-declined-text.txt create mode 100644 ext/mail-templates/booking-request-declined/booking-request-declined-html.html create mode 100644 ext/mail-templates/booking-request-declined/booking-request-declined-subject.txt create mode 100644 ext/mail-templates/booking-request-declined/booking-request-declined-text.txt create mode 100644 ext/mail-templates/email-changed/email-changed-html.html create mode 100644 ext/mail-templates/email-changed/email-changed-subject.txt create mode 100644 ext/mail-templates/email-changed/email-changed-text.txt create mode 100644 ext/mail-templates/money-paid/money-paid-html.html create mode 100644 ext/mail-templates/money-paid/money-paid-subject.txt create mode 100644 ext/mail-templates/money-paid/money-paid-text.txt create mode 100644 ext/mail-templates/new-booking-request/new-booking-request-html.html create mode 100644 ext/mail-templates/new-booking-request/new-booking-request-subject.txt create mode 100644 ext/mail-templates/new-booking-request/new-booking-request-text.txt create mode 100644 ext/mail-templates/new-message/new-message-html.html create mode 100644 ext/mail-templates/new-message/new-message-subject.txt create mode 100644 ext/mail-templates/new-message/new-message-text.txt create mode 100644 ext/mail-templates/password-changed/password-changed-html.html create mode 100644 ext/mail-templates/password-changed/password-changed-subject.txt create mode 100644 ext/mail-templates/password-changed/password-changed-text.txt create mode 100644 ext/mail-templates/reset-password/reset-password-html.html create mode 100644 ext/mail-templates/reset-password/reset-password-subject.txt create mode 100644 ext/mail-templates/reset-password/reset-password-text.txt create mode 100644 ext/mail-templates/review-by-customer-wanted/review-by-customer-wanted-html.html create mode 100644 ext/mail-templates/review-by-customer-wanted/review-by-customer-wanted-subject.txt create mode 100644 ext/mail-templates/review-by-customer-wanted/review-by-customer-wanted-text.txt create mode 100644 ext/mail-templates/review-by-other-party-published/review-by-other-party-published-html.html create mode 100644 ext/mail-templates/review-by-other-party-published/review-by-other-party-published-subject.txt create mode 100644 ext/mail-templates/review-by-other-party-published/review-by-other-party-published-text.txt create mode 100644 ext/mail-templates/review-by-other-party-unpublished/review-by-other-party-unpublished-html.html create mode 100644 ext/mail-templates/review-by-other-party-unpublished/review-by-other-party-unpublished-subject.txt create mode 100644 ext/mail-templates/review-by-other-party-unpublished/review-by-other-party-unpublished-text.txt create mode 100644 ext/mail-templates/review-by-provider-wanted/review-by-provider-wanted-html.html create mode 100644 ext/mail-templates/review-by-provider-wanted/review-by-provider-wanted-subject.txt create mode 100644 ext/mail-templates/review-by-provider-wanted/review-by-provider-wanted-text.txt create mode 100644 ext/mail-templates/verify-changed-email-address/verify-changed-email-address-html.html create mode 100644 ext/mail-templates/verify-changed-email-address/verify-changed-email-address-subject.txt create mode 100644 ext/mail-templates/verify-changed-email-address/verify-changed-email-address-text.txt create mode 100644 ext/mail-templates/verify-email-address/verify-email-address-html.html create mode 100644 ext/mail-templates/verify-email-address/verify-email-address-subject.txt create mode 100644 ext/mail-templates/verify-email-address/verify-email-address-text.txt diff --git a/ext/mail-templates/booking-request-accepted/booking-request-accepted-html.html b/ext/mail-templates/booking-request-accepted/booking-request-accepted-html.html new file mode 100644 index 00000000..6e0fd8ee --- /dev/null +++ b/ext/mail-templates/booking-request-accepted/booking-request-accepted-html.html @@ -0,0 +1,47 @@ + +{{~#*inline "format-money"~}} +{{money-amount money}} {{money.currency}} +{{~/inline~}} + +{{~#*inline "format-date"~}} +{{date date format="MMM d, YYYY"}} +{{~/inline~}} + + + +

Your booking request was accepted!

+ + {{#with transaction}} +

{{provider.display-name}} has accepted your booking request for {{listing.title}} from {{> format-date date=booking.start}} to {{> format-date date=booking.end}}.

+ +

We have charged {{> format-money money=payin-total}} from your credit card. Here's your receipt.

+ + + + + + + + + {{#each line-items}} + {{#contains include-for "customer"}} + + {{#eq "night" code}} + + + {{/eq}} + + {{/contains}} + {{/each}} + + + + + + + +
Payment
{{> format-money money=unit-price}} × {{number quantity}} {{inflect quantity "night" "nights"}}{{> format-money money=line-total}}
Payment total{{> format-money money=payin-total}}
+ + {{/with}} + + \ No newline at end of file diff --git a/ext/mail-templates/booking-request-accepted/booking-request-accepted-subject.txt b/ext/mail-templates/booking-request-accepted/booking-request-accepted-subject.txt new file mode 100644 index 00000000..8abd803e --- /dev/null +++ b/ext/mail-templates/booking-request-accepted/booking-request-accepted-subject.txt @@ -0,0 +1 @@ +{{transaction.provider.display-name}} accepted your booking request! \ No newline at end of file diff --git a/ext/mail-templates/booking-request-accepted/booking-request-accepted-text.txt b/ext/mail-templates/booking-request-accepted/booking-request-accepted-text.txt new file mode 100644 index 00000000..05870011 --- /dev/null +++ b/ext/mail-templates/booking-request-accepted/booking-request-accepted-text.txt @@ -0,0 +1,27 @@ + +{{~#*inline "format-money"~}} +{{money-amount money}} {{money.currency}} +{{~/inline~}} + +{{~#*inline "format-date"~}} +{{date date format="MMM d, YYYY"}} +{{~/inline~}} + +Your booking request was accepted! + +{{#with transaction~}} +{{provider.display-name}} has accepted your booking request for {{listing.title}} from {{> format-date date=booking.start}} to {{> format-date date=booking.end}}. + +We have charged {{> format-money money=payin-total}} from your credit card. Here's your receipt. + +Payment +{{#each line-items~}} +{{~#contains include-for "customer"~}} +{{~#eq "night" code~}} +{{> format-money money=unit-price}} x {{number quantity}} {{inflect quantity "night" "nights"}}: {{> format-money money=line-total}} +{{/eq~}} +{{~/contains~}} +{{/each~}} +Payment total: {{> format-money money=payin-total}} + +{{~/with}} \ No newline at end of file diff --git a/ext/mail-templates/booking-request-auto-declined/booking-request-auto-declined-html.html b/ext/mail-templates/booking-request-auto-declined/booking-request-auto-declined-html.html new file mode 100644 index 00000000..b9f998a4 --- /dev/null +++ b/ext/mail-templates/booking-request-auto-declined/booking-request-auto-declined-html.html @@ -0,0 +1,16 @@ + +{{~#*inline "format-date"~}} +{{date date format="MMM d, YYYY"}} +{{~/inline~}} + + + +

Your booking request has expired.

+ + {{#with transaction}} +

Unfortunately {{provider.display-name}} didn't respond to your booking request for {{listing.title}} from {{> format-date date=booking.start}} to {{> format-date date=booking.end}} on time, so the request has expired. You have not been billed.

+ {{/with}} + +

Try to book something else instead

+ + \ No newline at end of file diff --git a/ext/mail-templates/booking-request-auto-declined/booking-request-auto-declined-subject.txt b/ext/mail-templates/booking-request-auto-declined/booking-request-auto-declined-subject.txt new file mode 100644 index 00000000..83ecaffa --- /dev/null +++ b/ext/mail-templates/booking-request-auto-declined/booking-request-auto-declined-subject.txt @@ -0,0 +1 @@ +Your booking request has expired \ No newline at end of file diff --git a/ext/mail-templates/booking-request-auto-declined/booking-request-auto-declined-text.txt b/ext/mail-templates/booking-request-auto-declined/booking-request-auto-declined-text.txt new file mode 100644 index 00000000..714ccef9 --- /dev/null +++ b/ext/mail-templates/booking-request-auto-declined/booking-request-auto-declined-text.txt @@ -0,0 +1,12 @@ + +{{~#*inline "format-date"~}} +{{date date format="MMM d, YYYY"}} +{{~/inline~}} + +Your booking request has expired. + +{{#with transaction~}} +Unfortunately {{provider.display-name}} didn't respond to your booking request for {{listing.title}} from {{> format-date date=booking.start}} to {{> format-date date=booking.end}} on time, so the request has expired. You have not been billed. +{{~/with}} + +Try to book something else instead: {{marketplace.url}} \ No newline at end of file diff --git a/ext/mail-templates/booking-request-declined/booking-request-declined-html.html b/ext/mail-templates/booking-request-declined/booking-request-declined-html.html new file mode 100644 index 00000000..e27bfd8f --- /dev/null +++ b/ext/mail-templates/booking-request-declined/booking-request-declined-html.html @@ -0,0 +1,16 @@ + +{{~#*inline "format-date"~}} +{{date date format="MMM d, YYYY"}} +{{~/inline~}} + + + +

Your booking request was declined.

+ + {{#with transaction}} +

Unfortunately {{provider.display-name}} decided to decline your booking request for {{listing.title}} from {{> format-date date=booking.start}} to {{> format-date date=booking.end}}. You have not been billed.

+ {{/with}} + +

Try to book something else instead

+ + \ No newline at end of file diff --git a/ext/mail-templates/booking-request-declined/booking-request-declined-subject.txt b/ext/mail-templates/booking-request-declined/booking-request-declined-subject.txt new file mode 100644 index 00000000..4e7227c2 --- /dev/null +++ b/ext/mail-templates/booking-request-declined/booking-request-declined-subject.txt @@ -0,0 +1 @@ +{{transaction.provider.display-name}} declined your booking request \ No newline at end of file diff --git a/ext/mail-templates/booking-request-declined/booking-request-declined-text.txt b/ext/mail-templates/booking-request-declined/booking-request-declined-text.txt new file mode 100644 index 00000000..5d006813 --- /dev/null +++ b/ext/mail-templates/booking-request-declined/booking-request-declined-text.txt @@ -0,0 +1,12 @@ + +{{~#*inline "format-date"~}} +{{date date format="MMM d, YYYY"}} +{{~/inline~}} + +Your booking request was declined. + +{{#with transaction~}} +Unfortunately {{provider.display-name}} decided to decline your booking request for {{listing.title}} from {{> format-date date=booking.start}} to {{> format-date date=booking.end}}. You have not been billed. +{{~/with}} + +Try to book something else instead: {{marketplace.url}} \ No newline at end of file diff --git a/ext/mail-templates/email-changed/email-changed-html.html b/ext/mail-templates/email-changed/email-changed-html.html new file mode 100644 index 00000000..0ae3948a --- /dev/null +++ b/ext/mail-templates/email-changed/email-changed-html.html @@ -0,0 +1,11 @@ + + +

Hello {{recipient.first-name}},

+ +

Your {{marketplace.name}} account's email address was changed.

+ +

If you didn't make this change, please contact us.

+ +

Best regards,
The {{marketplace.name}} team

+ + \ No newline at end of file diff --git a/ext/mail-templates/email-changed/email-changed-subject.txt b/ext/mail-templates/email-changed/email-changed-subject.txt new file mode 100644 index 00000000..20c31087 --- /dev/null +++ b/ext/mail-templates/email-changed/email-changed-subject.txt @@ -0,0 +1 @@ +{{marketplace.name}} email address changed \ No newline at end of file diff --git a/ext/mail-templates/email-changed/email-changed-text.txt b/ext/mail-templates/email-changed/email-changed-text.txt new file mode 100644 index 00000000..4b2fa4e0 --- /dev/null +++ b/ext/mail-templates/email-changed/email-changed-text.txt @@ -0,0 +1,8 @@ +Hello {{recipient.first-name}}, + +Your {{marketplace.name}} account's email address was changed. + +If you didn't make this change, please contact us. + +Best regards, +The {{marketplace.name}} team \ No newline at end of file diff --git a/ext/mail-templates/money-paid/money-paid-html.html b/ext/mail-templates/money-paid/money-paid-html.html new file mode 100644 index 00000000..50d5c7a1 --- /dev/null +++ b/ext/mail-templates/money-paid/money-paid-html.html @@ -0,0 +1,52 @@ + +{{~#*inline "format-money"~}} +{{money-amount money}} {{money.currency}} +{{~/inline~}} + +{{~#*inline "format-date"~}} +{{date date format="MMM d, YYYY"}} +{{~/inline~}} + + + + {{#with transaction}} +

You have been paid {{> format-money money=payout-total}}

+ +

We have sent you {{> format-money money=payout-total}} for the booking of {{listing.title}} from {{> format-date date=booking.start}} to {{> format-date date=booking.end}} by {{customer.display-name}}. It might take up to 7 days for the money to reach your bank account.

+ +

Here's the breakdown.

+ + + + + + + + + {{#each line-items}} + {{#contains include-for "provider"}} + + {{#eq "night" code}} + + + {{/eq}} + + {{#eq "provider-commission" code}} + + + {{/eq}} + + {{/contains}} + {{/each}} + + + + + + + +
Payment
{{> format-money money=unit-price}} × {{number quantity}} {{inflect quantity "night" "nights"}}{{> format-money money=line-total}}{{marketplace.name}} fee:{{> format-money money=line-total}}
You earn{{> format-money money=payout-total}}
+ + {{/with}} + + \ No newline at end of file diff --git a/ext/mail-templates/money-paid/money-paid-subject.txt b/ext/mail-templates/money-paid/money-paid-subject.txt new file mode 100644 index 00000000..229cbd60 --- /dev/null +++ b/ext/mail-templates/money-paid/money-paid-subject.txt @@ -0,0 +1 @@ +You have been paid {{money-amount transaction.payout-total}} {{transaction.payout-total.currency}} \ No newline at end of file diff --git a/ext/mail-templates/money-paid/money-paid-text.txt b/ext/mail-templates/money-paid/money-paid-text.txt new file mode 100644 index 00000000..f3cdf1da --- /dev/null +++ b/ext/mail-templates/money-paid/money-paid-text.txt @@ -0,0 +1,29 @@ + +{{~#*inline "format-money"~}} +{{money-amount money}} {{money.currency}} +{{~/inline~}} + +{{~#*inline "format-date"~}} +{{date date format="MMM d, YYYY"}} +{{~/inline~}} + +{{#with transaction~}} +You have been paid {{> format-money money=payout-total}} + +We have sent you {{> format-money money=payout-total}} for the booking of {{listing.title}} from {{> format-date date=booking.start}} to {{> format-date date=booking.end}} by {{customer.display-name}}. It might take up to 7 days for the money to reach your bank account. + +Here's the breakdown. + +Payment +{{#each line-items~}} +{{~#contains include-for "provider"~}} +{{~#eq "night" code~}} +{{> format-money money=unit-price}} x {{number quantity}} {{inflect quantity "night" "nights"}}: {{> format-money money=line-total}} +{{/eq~}} +{{~#eq "provider-commission" code~}} +{{marketplace.name}} fee: {{> format-money money=line-total}} +{{/eq~}} +{{~/contains~}} +{{/each~}} +You earn: {{> format-money money=payout-total}} +{{~/with}} \ No newline at end of file diff --git a/ext/mail-templates/new-booking-request/new-booking-request-html.html b/ext/mail-templates/new-booking-request/new-booking-request-html.html new file mode 100644 index 00000000..ea1b57d5 --- /dev/null +++ b/ext/mail-templates/new-booking-request/new-booking-request-html.html @@ -0,0 +1,54 @@ + +{{~#*inline "format-money"~}} +{{money-amount money}} {{money.currency}} +{{~/inline~}} + +{{~#*inline "format-date"~}} +{{date date format="MMM d, YYYY"}} +{{~/inline~}} + + + + {{#with transaction}} +

Please respond to a request by {{customer.display-name}}

+ +

Good news! {{customer.display-name}} just requested to book {{listing.title}} from {{> format-date date=booking.start}} to {{> format-date date=booking.end}}. Here's the breakdown.

+ + + + + + + + + {{#each line-items}} + {{#contains include-for "provider"}} + + {{#eq "night" code}} + + + {{/eq}} + + {{#eq "provider-commission" code}} + + + {{/eq}} + + {{/contains}} + {{/each}} + + + + + + + +
Payment
{{> format-money money=unit-price}} × {{number quantity}} {{inflect quantity "night" "nights"}}{{> format-money money=line-total}}{{marketplace.name}} fee:{{> format-money money=line-total}}
You earn{{> format-money money=payout-total}}
+ +

You need to accept the request by {{> format-date date=booking-expires-on}}. Otherwise the request will be expired and you won't get paid. If the booked dates won't work for you, you can also choose to decline the request.

+ +

Accept or decline the booking

+ + {{/with}} + + \ No newline at end of file diff --git a/ext/mail-templates/new-booking-request/new-booking-request-subject.txt b/ext/mail-templates/new-booking-request/new-booking-request-subject.txt new file mode 100644 index 00000000..c75c377d --- /dev/null +++ b/ext/mail-templates/new-booking-request/new-booking-request-subject.txt @@ -0,0 +1 @@ +{{transaction.customer.display-name}} has requested to book {{transaction.listing.title}} \ No newline at end of file diff --git a/ext/mail-templates/new-booking-request/new-booking-request-text.txt b/ext/mail-templates/new-booking-request/new-booking-request-text.txt new file mode 100644 index 00000000..4690728a --- /dev/null +++ b/ext/mail-templates/new-booking-request/new-booking-request-text.txt @@ -0,0 +1,32 @@ + +{{~#*inline "format-money"~}} +{{money-amount money}} {{money.currency}} +{{~/inline~}} + +{{~#*inline "format-date"~}} +{{date date format="MMM d, YYYY"}} +{{~/inline~}} + +{{#with transaction~}} +Please respond to a request by {{customer.display-name}} + +Good news! {{customer.display-name}} just requested to book {{listing.title}} from {{> format-date date=booking.start}} to {{> format-date date=booking.end}}. Here's the breakdown. + +Payment +{{#each line-items~}} +{{~#contains include-for "provider"~}} +{{~#eq "night" code~}} +{{> format-money money=unit-price}} x {{number quantity}} {{inflect quantity "night" "nights"}}: {{> format-money money=line-total}} +{{/eq~}} +{{~#eq "provider-commission" code~}} +{{marketplace.name}} fee: {{> format-money money=line-total}} +{{/eq~}} +{{~/contains~}} +{{/each~}} +You earn: {{> format-money money=payout-total}} + +You need to accept the request by {{> format-date date=booking-expires-on}}. Otherwise the request will be expired and you won't get paid. If the booked dates won't work for you, you can also choose to decline the request. + +Accept or decline the booking: {{marketplace.url}}/sale/{{url-encode id}}/details + +{{~/with}} \ No newline at end of file diff --git a/ext/mail-templates/new-message/new-message-html.html b/ext/mail-templates/new-message/new-message-html.html new file mode 100644 index 00000000..1435b306 --- /dev/null +++ b/ext/mail-templates/new-message/new-message-html.html @@ -0,0 +1,19 @@ + + + + {{#with message}} +

You have a new message from {{sender.display-name}}

+ +
"{{content}}"
+ + {{#eq recipient-role "customer"}} +

Reply to {{sender.display-name}}

+ {{/eq}} + + {{#eq recipient-role "provider"}} +

Reply to {{sender.display-name}}

+ {{/eq}} + + {{/with}} + + \ No newline at end of file diff --git a/ext/mail-templates/new-message/new-message-subject.txt b/ext/mail-templates/new-message/new-message-subject.txt new file mode 100644 index 00000000..bd37ee2a --- /dev/null +++ b/ext/mail-templates/new-message/new-message-subject.txt @@ -0,0 +1 @@ +{{message.sender.display-name}} has sent you a new message \ No newline at end of file diff --git a/ext/mail-templates/new-message/new-message-text.txt b/ext/mail-templates/new-message/new-message-text.txt new file mode 100644 index 00000000..5bd5b8bb --- /dev/null +++ b/ext/mail-templates/new-message/new-message-text.txt @@ -0,0 +1,15 @@ +{{#with message~}} + +You have a new message from {{sender.display-name}} + +"{{content}}" + +{{#eq recipient-role "customer"~}} +Reply to {{sender.display-name}}: {{marketplace.url}}/order/{{url-encode transaction.id}}/details +{{/eq~}} + +{{#eq recipient-role "provider"~}} +Reply to {{sender.display-name}}: {{marketplace.url}}/sale/{{url-encode transaction.id}}/details +{{/eq~}} + +{{~/with}} \ No newline at end of file diff --git a/ext/mail-templates/password-changed/password-changed-html.html b/ext/mail-templates/password-changed/password-changed-html.html new file mode 100644 index 00000000..bba616fd --- /dev/null +++ b/ext/mail-templates/password-changed/password-changed-html.html @@ -0,0 +1,11 @@ + + +

Hello {{recipient.first-name}},

+ +

Your {{marketplace.name}} account's password was changed.

+ +

If you didn't make this change, please contact us.

+ +

Best regards,
The {{marketplace.name}} team

+ + \ No newline at end of file diff --git a/ext/mail-templates/password-changed/password-changed-subject.txt b/ext/mail-templates/password-changed/password-changed-subject.txt new file mode 100644 index 00000000..ae8a5025 --- /dev/null +++ b/ext/mail-templates/password-changed/password-changed-subject.txt @@ -0,0 +1 @@ +{{marketplace.name}} password changed \ No newline at end of file diff --git a/ext/mail-templates/password-changed/password-changed-text.txt b/ext/mail-templates/password-changed/password-changed-text.txt new file mode 100644 index 00000000..65e747bf --- /dev/null +++ b/ext/mail-templates/password-changed/password-changed-text.txt @@ -0,0 +1,8 @@ +Hello {{recipient.first-name}}, + +Your {{marketplace.name}} account's password was changed. + +If you didn't make this change, please contact us. + +Best regards, +The {{marketplace.name}} team \ No newline at end of file diff --git a/ext/mail-templates/reset-password/reset-password-html.html b/ext/mail-templates/reset-password/reset-password-html.html new file mode 100644 index 00000000..1ea12b4f --- /dev/null +++ b/ext/mail-templates/reset-password/reset-password-html.html @@ -0,0 +1,15 @@ + + +

Hello {{recipient.first-name}},

+ +

You have indicated that you have forgotten your password for {{marketplace.name}}. Click the following link to reset your password:

+ +

{{marketplace.url}}/reset-password?t={{url-encode password-reset.token}}&e={{url-encode password-reset.email-address}}

+ +

If you don't use this link within 1 hour, it will expire. You can request a new password reset link, if you need to.

+ +

If you didn't request this, please ignore this email. Your password won't be changed until you use the link above to set a new one.

+ +

Best regards,
The {{marketplace.name}} team

+ + \ No newline at end of file diff --git a/ext/mail-templates/reset-password/reset-password-subject.txt b/ext/mail-templates/reset-password/reset-password-subject.txt new file mode 100644 index 00000000..a30b1d07 --- /dev/null +++ b/ext/mail-templates/reset-password/reset-password-subject.txt @@ -0,0 +1 @@ +Password reset instructions for {{marketplace.name}} \ No newline at end of file diff --git a/ext/mail-templates/reset-password/reset-password-text.txt b/ext/mail-templates/reset-password/reset-password-text.txt new file mode 100644 index 00000000..7800024d --- /dev/null +++ b/ext/mail-templates/reset-password/reset-password-text.txt @@ -0,0 +1,12 @@ +Hello {{recipient.first-name}}, + +You have indicated that you have forgotten your password for {{marketplace.name}}. Click the following link to reset your password: + +{{marketplace.url}}/reset-password?t={{url-encode password-reset.token}}&e={{url-encode password-reset.email-address}} + +If you don't use this link within 1 hour, it will expire. You can request a new password reset link, if you need to. + +If you didn't request this, please ignore this email. Your password won't be changed until you use the link above to set a new one. + +Best regards, +The {{marketplace.name}} team \ No newline at end of file diff --git a/ext/mail-templates/review-by-customer-wanted/review-by-customer-wanted-html.html b/ext/mail-templates/review-by-customer-wanted/review-by-customer-wanted-html.html new file mode 100644 index 00000000..4059462d --- /dev/null +++ b/ext/mail-templates/review-by-customer-wanted/review-by-customer-wanted-html.html @@ -0,0 +1,11 @@ + + + {{#with transaction}} +

How was your experience with {{listing.title}}? Write a review!

+ +

You recently booked {{listing.title}} from {{provider.display-name}}. Please write a review to describe your experience. Reviews are important part of the {{marketplace.name}} community.

+ +

Leave a review

+ {{/with}} + + \ No newline at end of file diff --git a/ext/mail-templates/review-by-customer-wanted/review-by-customer-wanted-subject.txt b/ext/mail-templates/review-by-customer-wanted/review-by-customer-wanted-subject.txt new file mode 100644 index 00000000..bbfbdc5a --- /dev/null +++ b/ext/mail-templates/review-by-customer-wanted/review-by-customer-wanted-subject.txt @@ -0,0 +1 @@ +Write a review for {{transaction.listing.title}} \ No newline at end of file diff --git a/ext/mail-templates/review-by-customer-wanted/review-by-customer-wanted-text.txt b/ext/mail-templates/review-by-customer-wanted/review-by-customer-wanted-text.txt new file mode 100644 index 00000000..5c240e11 --- /dev/null +++ b/ext/mail-templates/review-by-customer-wanted/review-by-customer-wanted-text.txt @@ -0,0 +1,9 @@ + +{{~#with transaction~}} + +How was your experience with {{listing.title}}? Write a review! + +You recently booked {{listing.title}} from {{provider.display-name}}. Please write a review to describe your experience. Reviews are important part of the {{marketplace.name}} community. + +Leave a review: {{marketplace.url}}/order/{{url-encode id}}/details +{{~/with~}} \ No newline at end of file diff --git a/ext/mail-templates/review-by-other-party-published/review-by-other-party-published-html.html b/ext/mail-templates/review-by-other-party-published/review-by-other-party-published-html.html new file mode 100644 index 00000000..5644b047 --- /dev/null +++ b/ext/mail-templates/review-by-other-party-published/review-by-other-party-published-html.html @@ -0,0 +1,19 @@ + + + {{#with transaction}} +

{{other-party.display-name}} wrote you a review. Here's what they wrote.

+ + {{#each reviews}} + {{#eq recipient.id subject.id}} +
"{{content}}"
+ {{/eq}} + {{/each}} + +

The review has been published on your {{marketplace.name}} profile.

+ +

+ View your profile. +

+ {{/with}} + + \ No newline at end of file diff --git a/ext/mail-templates/review-by-other-party-published/review-by-other-party-published-subject.txt b/ext/mail-templates/review-by-other-party-published/review-by-other-party-published-subject.txt new file mode 100644 index 00000000..c9823833 --- /dev/null +++ b/ext/mail-templates/review-by-other-party-published/review-by-other-party-published-subject.txt @@ -0,0 +1 @@ +Read the review {{other-party.display-name}} wrote you \ No newline at end of file diff --git a/ext/mail-templates/review-by-other-party-published/review-by-other-party-published-text.txt b/ext/mail-templates/review-by-other-party-published/review-by-other-party-published-text.txt new file mode 100644 index 00000000..824650c9 --- /dev/null +++ b/ext/mail-templates/review-by-other-party-published/review-by-other-party-published-text.txt @@ -0,0 +1,14 @@ + +{{~#with transaction~}} + +{{other-party.display-name}} wrote you a review. Here's what they wrote. + +{{#each reviews~}} +{{#eq recipient.id subject.id}}"{{content}}"{{/eq}} +{{~/each}} + +The review has been published on your {{marketplace.name}} profile. + +View your profile: {{marketplace.url}}/u/{{url-encode recipient.id}} + +{{~/with~}} \ No newline at end of file diff --git a/ext/mail-templates/review-by-other-party-unpublished/review-by-other-party-unpublished-html.html b/ext/mail-templates/review-by-other-party-unpublished/review-by-other-party-unpublished-html.html new file mode 100644 index 00000000..1d5b8986 --- /dev/null +++ b/ext/mail-templates/review-by-other-party-unpublished/review-by-other-party-unpublished-html.html @@ -0,0 +1,13 @@ + + + {{#with transaction}} +

Find out what {{other-party.display-name}} wrote!

+ +

{{other-party.display-name}} has left you a new review. To see what they wrote, please leave them a review to describe your experience.

+ +

+ Leave a review +

+ {{/with}} + + \ No newline at end of file diff --git a/ext/mail-templates/review-by-other-party-unpublished/review-by-other-party-unpublished-subject.txt b/ext/mail-templates/review-by-other-party-unpublished/review-by-other-party-unpublished-subject.txt new file mode 100644 index 00000000..c180afae --- /dev/null +++ b/ext/mail-templates/review-by-other-party-unpublished/review-by-other-party-unpublished-subject.txt @@ -0,0 +1 @@ +{{other-party.display-name}} wrote you a review \ No newline at end of file diff --git a/ext/mail-templates/review-by-other-party-unpublished/review-by-other-party-unpublished-text.txt b/ext/mail-templates/review-by-other-party-unpublished/review-by-other-party-unpublished-text.txt new file mode 100644 index 00000000..eecbac2f --- /dev/null +++ b/ext/mail-templates/review-by-other-party-unpublished/review-by-other-party-unpublished-text.txt @@ -0,0 +1,10 @@ + +{{~#with transaction~}} + +Find out what {{other-party.display-name}} wrote! + +{{other-party.display-name}} has left you a new review. To see what they wrote, please leave them a review to describe your experience. + +Leave a review: {{marketplace.url}}/{{#eq recipient-role "customer"}}order{{else}}sale{{/eq}}/{{url-encode id}}/details + +{{~/with~}} \ No newline at end of file diff --git a/ext/mail-templates/review-by-provider-wanted/review-by-provider-wanted-html.html b/ext/mail-templates/review-by-provider-wanted/review-by-provider-wanted-html.html new file mode 100644 index 00000000..1309abfe --- /dev/null +++ b/ext/mail-templates/review-by-provider-wanted/review-by-provider-wanted-html.html @@ -0,0 +1,11 @@ + + + {{#with transaction}} +

How was your experience with {{customer.display-name}}? Write a review!

+ +

{{customer.display-name}} recently booked {{listing.title}} from you. Please write {{customer.display-name}} a review to describe your experience. Reviews are important part of the {{marketplace.name}} community.

+ +

Leave a review

+ {{/with}} + + \ No newline at end of file diff --git a/ext/mail-templates/review-by-provider-wanted/review-by-provider-wanted-subject.txt b/ext/mail-templates/review-by-provider-wanted/review-by-provider-wanted-subject.txt new file mode 100644 index 00000000..0f970849 --- /dev/null +++ b/ext/mail-templates/review-by-provider-wanted/review-by-provider-wanted-subject.txt @@ -0,0 +1 @@ +Write a review for {{transaction.customer.display-name}} \ No newline at end of file diff --git a/ext/mail-templates/review-by-provider-wanted/review-by-provider-wanted-text.txt b/ext/mail-templates/review-by-provider-wanted/review-by-provider-wanted-text.txt new file mode 100644 index 00000000..1789c3bd --- /dev/null +++ b/ext/mail-templates/review-by-provider-wanted/review-by-provider-wanted-text.txt @@ -0,0 +1,9 @@ + +{{~#with transaction~}} + +How was your experience with {{customer.display-name}}? Write a review! + +{{customer.display-name}} recently booked {{listing.title}} from you. Please write {{customer.display-name}} a review to describe your experience. Reviews are important part of the {{marketplace.name}} community. + +Leave a review: {{marketplace.url}}/sale/{{url-encode id}}/details +{{~/with~}} \ No newline at end of file diff --git a/ext/mail-templates/verify-changed-email-address/verify-changed-email-address-html.html b/ext/mail-templates/verify-changed-email-address/verify-changed-email-address-html.html new file mode 100644 index 00000000..e7781df6 --- /dev/null +++ b/ext/mail-templates/verify-changed-email-address/verify-changed-email-address-html.html @@ -0,0 +1,15 @@ + + +

Hello {{recipient.first-name}},

+ +

To complete your email address change in {{marketplace.name}}, verify your email by clicking the link below:

+ +

{{marketplace.url}}/verify-email?t={{url-encode email-verification.token}}

+ +

Alternatively, you can copy the link to your browser's address bar.

+ +

If you don't use this link within 2 days, it will expire. You can request a new verification link, if you need to.

+ +

Best regards,
The {{marketplace.name}} team

+ + \ No newline at end of file diff --git a/ext/mail-templates/verify-changed-email-address/verify-changed-email-address-subject.txt b/ext/mail-templates/verify-changed-email-address/verify-changed-email-address-subject.txt new file mode 100644 index 00000000..4faf35b5 --- /dev/null +++ b/ext/mail-templates/verify-changed-email-address/verify-changed-email-address-subject.txt @@ -0,0 +1 @@ +Email verification instructions for {{marketplace.name}} \ No newline at end of file diff --git a/ext/mail-templates/verify-changed-email-address/verify-changed-email-address-text.txt b/ext/mail-templates/verify-changed-email-address/verify-changed-email-address-text.txt new file mode 100644 index 00000000..d5a6410d --- /dev/null +++ b/ext/mail-templates/verify-changed-email-address/verify-changed-email-address-text.txt @@ -0,0 +1,12 @@ +Hello {{recipient.first-name}}, + +To complete your email address change in {{marketplace.name}}, verify your email by clicking the link below: + +{{marketplace.url}}/verify-email?t={{url-encode email-verification.token}} + +Alternatively, you can copy the link to your browser's address bar. + +If you don't use this link within 2 days, it will expire. You can request a new verification link, if you need to. + +Best regards, +The {{marketplace.name}} team \ No newline at end of file diff --git a/ext/mail-templates/verify-email-address/verify-email-address-html.html b/ext/mail-templates/verify-email-address/verify-email-address-html.html new file mode 100644 index 00000000..25531572 --- /dev/null +++ b/ext/mail-templates/verify-email-address/verify-email-address-html.html @@ -0,0 +1,15 @@ + + +

Hello {{recipient.first-name}},

+ +

To complete your signup to {{marketplace.name}}, verify your email by clicking the link below:

+ +

{{marketplace.url}}/verify-email?t={{url-encode email-verification.token}}

+ +

Alternatively, you can copy the link to your browser's address bar.

+ +

If you don't use this link within 2 days, it will expire. You can request a new verification link, if you need to.

+ +

Best regards,
The {{marketplace.name}} team

+ + \ No newline at end of file diff --git a/ext/mail-templates/verify-email-address/verify-email-address-subject.txt b/ext/mail-templates/verify-email-address/verify-email-address-subject.txt new file mode 100644 index 00000000..4faf35b5 --- /dev/null +++ b/ext/mail-templates/verify-email-address/verify-email-address-subject.txt @@ -0,0 +1 @@ +Email verification instructions for {{marketplace.name}} \ No newline at end of file diff --git a/ext/mail-templates/verify-email-address/verify-email-address-text.txt b/ext/mail-templates/verify-email-address/verify-email-address-text.txt new file mode 100644 index 00000000..f408cc60 --- /dev/null +++ b/ext/mail-templates/verify-email-address/verify-email-address-text.txt @@ -0,0 +1,12 @@ +Hello {{recipient.first-name}}, + +To complete your signup to {{marketplace.name}}, verify your email by clicking the link below: + +{{marketplace.url}}/verify-email?t={{url-encode email-verification.token}} + +Alternatively, you can copy the link to your browser's address bar. + +If you don't use this link within 2 days, it will expire. You can request a new verification link, if you need to. + +Best regards, +The {{marketplace.name}} team \ No newline at end of file From 45a488d0a13ca2c916a2b0bf662a5233785f16b3 Mon Sep 17 00:00:00 2001 From: Boyan Tabakov Date: Tue, 19 Dec 2017 16:39:28 +0200 Subject: [PATCH 2/2] Add information about mail templates --- ext/mail-templates/README.md | 150 +++++++++++++++++++++++++++++++++++ 1 file changed, 150 insertions(+) create mode 100644 ext/mail-templates/README.md diff --git a/ext/mail-templates/README.md b/ext/mail-templates/README.md new file mode 100644 index 00000000..c58056f3 --- /dev/null +++ b/ext/mail-templates/README.md @@ -0,0 +1,150 @@ +# Mail templates + +This directory contains templates for all default mails sent as result of +activity in the marketplace. + +Note that, at present, changes made to the template files here will not take +effect automatically. Marketplace owner needs to notify the Sharetribe team. + +## Template parts + +A template consists of three files: + +* `TEMPLATE_NAME-subject.txt` - holds the mail Subject line template +* `TEMPLATE_NAME-text.txt` - holds the template for the plain text version of the mail +* `TEMPLATE_NAME-html.html` - contains the template for the HTML version of the mail + +All the parts are mandatory. All emails that are sent from the marketplace +contain both the plain text and HTML variants and the recipient's mail client is +free to choose which one to visualize and how. + +## Template syntax + +Templates use [Handlebars](http://handlebarsjs.com/) syntax. + +Example html: + +```html + + +

Hello {{recipient.first-name}},

+ +

Your {{marketplace.name}} account's email address was changed.

+ +

If you didn't make this change, please contact us.

+ +

Best regards,
The {{marketplace.name}} team

+ + +``` + +Example text version: + +``` +Hello {{recipient.first-name}}, + +Your {{marketplace.name}} account's email address was changed. + +If you didn't make this change, please contact us. + +Best regards, +The {{marketplace.name}} team +``` + +Variables within `{{ }}` are expanded and escaped, so that they are safe to +place inside HTML content. As seen above, some variables have nested values, +which can be accessed with dot `.` operator. + +The template syntax supports conditionals, loops, helpers and other constructs. +For details see the [Handlebars documentation](http://handlebarsjs.com/). + +## List of templates + +### Built-in event mails + +#### email-changed + +Sent to a user when their registered email address has been successfully +changed. + +#### new-message + +Sent to a user when the other party in a transaction has sent them a new +message. + +#### password-changed + +Sent to a user when their account's password was successfully changed. + +#### reset-password + +Sent to a user when a request for resetting their password is received. The mail +contains a link with password reset token and instructs the user to complete the +password reset. + +#### verify-changed-email-address + +Sent to a user when they have requested to change their registered email +address. The mail contains an email verification link and instructs the user how +to verify their email address. + +#### verify-email-address + +Sent to a user after they sign up for an account in the marketplace and +instructs them to verify their email address. + +### Transaction engine mails + +The templates in the list below correspond to mails defined in the default +transaction process. Customized transaction processes can have different set of +mail templates. + +`customer` and `provider` below mean the corresponding parties in a transaction. + +#### booking-request-accepted + +Sent to the customer when the provider accepts a booking and the customer's +payment is captured. + +#### booking-request-auto-declined + +Sent to the customer when the provider does not accept the booking within the +allowed time and the transaction is automatically declined. + +#### booking-request-declined + +Sent to the customer when the provider manually declines a transaction. + +#### money-paid + +Sent to the provider when a booking's end date has passed and payment is sent to +the provider's bank account. + +#### new-booking-request + +Sent when a customer makes a new booking and preauthorizes payment. + +#### review-by-customer-wanted + +Sent to the customer when the booking end-date has passed and reviews for the +transaction can be posted. This mail should prompt the recipient to write a +review. + +#### review-by-other-party-published + +Sent to one of the parties in a transaction when the other party has posted a +review and the review has been published (i.e. contents of the review are +public). + +#### review-by-other-party-unpublished + +Sent to one of the parties in a transation when the other party has posted a +review but the review is not yet published, because the first party hasn't yet +posted their review or the review time has not expired. This mail should prompt +the recipient to write their own review. + +#### review-by-provider-wanted + +Sent to the customer when the booking end-date has passed and reviews for the +transaction can be posted. This mail should prompt the recipient to write a +review.