{{.firstName}} we are so excited to help you build your next million dollar SaaS!
+
+
+
+
+
Over the next 24 hours we're going to send you information about our prize winning SaaS tools we are using to help you build at 10x. When you are ready to start producing apps at max capacity click the button below.
+
+
+
\ No newline at end of file
diff --git a/Backend/bin/pb_hooks/emails/first-purchase.mjml b/Backend/bin/pb_hooks/emails/first-purchase.mjml
new file mode 100644
index 0000000..1d1f546
--- /dev/null
+++ b/Backend/bin/pb_hooks/emails/first-purchase.mjml
@@ -0,0 +1,132 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Thanks For Purchasing
+
+
+
+
+ {{.firstName}} we are so excited to help you build your next million
+ dollar SaaS!
+ Over the next 24 hours we're going to send you information about
+ our prize winning SaaS
+ tools
+ we are using to help you build at 10x. When you are ready to start
+ producing apps at max capacity click the button below.
+ Learn More
+ Thanks,
+ The {{.company}} Team
+
+
+
+
+
+
+ Web
+
+
+ Github
+
+
+ Youtube
+
+
+ X
+
+
+
+
+
+
diff --git a/Backend/bin/pb_hooks/main.pb.js b/Backend/bin/pb_hooks/main.pb.js
index 9b8bc48..c222fbe 100644
--- a/Backend/bin/pb_hooks/main.pb.js
+++ b/Backend/bin/pb_hooks/main.pb.js
@@ -17,9 +17,23 @@ onRecordAfterCreateRequest((e) => {
$app.newMailClient().send(message);
}, "user");
+onRecordAfterCreateRequest((e) => {
+ const user = $app.dao().findRecordById("articles", e.record.get("user_id"))
+ const message = new MailerMessage({
+ from: {
+ address: $app.settings().meta.senderAddress,
+ name: $app.settings().meta.senderName,
+ },
+ to: [{ address: user.get("email") }],
+ subject: "Thanks For Purchasing!",
+ html: $template
+ .loadFiles(`${__hooks}/emails/signup.html`)
+ .render({
+ firstName: e.record.get("firstName"),
+ company: $app.settings().meta.appName,
+ }),
+ // bcc, cc and custom headers are also supported...
+ });
-routerAdd("GET", "/hello/:name", (c) => {
- let name = c.pathParam("name");
-
- return c.json(200, { message: "Hello " + name });
-});
+ $app.newMailClient().send(message);
+}, "subscription");