Skip to main content

max / makenotwork

2.8 KB · 95 lines History Blame Raw
1 //! Onboarding drip email sequence for new signups.
2
3 use crate::email::EmailClient;
4 use crate::error::Result;
5
6 impl EmailClient {
7 /// Step 1: Welcome email sent immediately after signup.
8 pub async fn send_onboarding_welcome(
9 &self,
10 to_email: &str,
11 to_name: Option<&str>,
12 host_url: &str,
13 ) -> Result<()> {
14 let subject = "Welcome to Makenot.work";
15 let body = format!(
16 r#"Hi{name},
17
18 Welcome to Makenot.work -- fair distribution for creatives of all kinds.
19
20 Here's what makes us different:
21 - 0% platform fee. You keep everything (minus Stripe's ~3% processing).
22 - No lock-in. Export your data, cancel anytime.
23 - Source-available. You can see how everything works.
24
25 To get started, head to your dashboard:
26 {host_url}/dashboard
27
28 You'll find a checklist there to help you set up your profile, connect Stripe, create your first project, and publish your first item.
29
30 If you have questions, reply to this email -- it goes straight to a human.
31
32 - Makenotwork"#,
33 name = crate::email::greeting(to_name),
34 host_url = host_url,
35 );
36
37 self.transport.send_email(to_email, subject, &body).await
38 }
39
40 /// Step 2: Profile setup tips (sent ~24h after signup).
41 pub async fn send_onboarding_profile(
42 &self,
43 to_email: &str,
44 to_name: Option<&str>,
45 host_url: &str,
46 ) -> Result<()> {
47 let subject = "Set up your creator profile";
48 let body = format!(
49 r#"Hi{name},
50
51 A quick tip: creators with a display name and bio get more attention from fans.
52
53 Head to your account settings to add them:
54 {host_url}/dashboard (Account tab)
55
56 Your display name appears on all your projects and items. Your bio tells fans who you are and what you create.
57
58 Once your profile is set, create your first project -- that's where your items live.
59
60 - Makenotwork"#,
61 name = crate::email::greeting(to_name),
62 host_url = host_url,
63 );
64
65 self.transport.send_email(to_email, subject, &body).await
66 }
67
68 /// Step 3: Stripe connection guide (sent ~72h after signup).
69 pub async fn send_onboarding_stripe(
70 &self,
71 to_email: &str,
72 to_name: Option<&str>,
73 host_url: &str,
74 ) -> Result<()> {
75 let subject = "Start receiving payments";
76 let body = format!(
77 r#"Hi{name},
78
79 To sell on Makenot.work, connect your Stripe account. It takes about 5 minutes.
80
81 {host_url}/dashboard (Payments tab)
82
83 Stripe handles payment processing at ~3% per transaction. That's the only fee -- Makenot.work takes 0%.
84
85 Once connected, you can set prices on your items and start selling immediately.
86
87 - Makenotwork"#,
88 name = crate::email::greeting(to_name),
89 host_url = host_url,
90 );
91
92 self.transport.send_email(to_email, subject, &body).await
93 }
94 }
95