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
{{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 | +|
|---|---|
| {{> format-money money=unit-price}} × {{number quantity}} {{inflect quantity "night" "nights"}} | +{{> format-money money=line-total}} | + {{/eq}} +
| Payment total | +{{> format-money money=payin-total}} | +
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~}} + + + +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
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 | +|||
|---|---|---|---|
| {{> format-money money=unit-price}} × {{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}} +
| You earn | +{{> format-money money=payout-total}} | +
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 | +|||
|---|---|---|---|
| {{> format-money money=unit-price}} × {{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}} +
| 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.
+ + + + {{/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}} +"{{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
Hello {{recipient.first-name}},
+ +You have indicated that you have forgotten your password for {{marketplace.name}}. Click the following link to reset your password:
+ + + +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
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.
+ + + {{/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}} +"{{content}}"+ {{/eq}} + {{/each}} + +
The review has been published on your {{marketplace.name}} 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}} +{{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}} +{{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.
+ + + {{/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
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