Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Add Tuta as discount coupon provider in Ente Friends program

anandbaburajanc328358572de
diff --git a/server/mail-templates/discount_coupon_tuta.html b/server/mail-templates/discount_coupon_tuta.html
new file mode 100644
index 0000000000..f8f25b5185
--- /dev/null
+++ b/server/mail-templates/discount_coupon_tuta.html
@@ -0,0 +1,16 @@
+{{template "base" .}} {{define "content"}}
+<h2>Ente Friends - Tuta discount code</h2>
+
+<p>Hello,</p>
+
+<p>
+ <a href="https://app.tuta.com/signup/#token={{.CouponCode}}">Click here</a> to
+ get 25% off any Tuta plan for the first year.
+</p>
+
+<p>
+ Best,<br />
+ Team Ente
+</p>
+
+{{end}}
diff --git a/server/pkg/controller/discountcoupon/controller.go b/server/pkg/controller/discountcoupon/controller.go
index 46003a6fc4..11b8a69636 100644
--- a/server/pkg/controller/discountcoupon/controller.go
+++ b/server/pkg/controller/discountcoupon/controller.go
@@ -23,6 +23,7 @@ const MaxSendCount = 10
// While adding new providers, consider adding customized templates in email package.
var AllowedProviders = map[string]bool{
"Kagi": true,
+ "Tuta": true,
"Test": true,
}
@@ -144,6 +145,9 @@ func (c *Controller) sendCouponEmail(ctx context.Context, user ente.User, coupon
case "Kagi":
subject = "Ente Friends - Kagi trial code"
templateName = "discount_coupon_kagi.html"
+ case "Tuta":
+ subject = "Ente Friends - Tuta trial code"
+ templateName = "discount_coupon_tuta.html"
case "Test":
subject = "Ente Friends - Test trial code"
templateName = "discount_coupon_test.html"