-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Send email when canceling trial proactively
- Loading branch information
Showing
3 changed files
with
64 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -189,3 +189,30 @@ export async function sendAdminDataDeletionEmail({ | |
}; | ||
return sendEmail(email, msg); | ||
} | ||
|
||
export async function sendProactiveTrialCancelledEmail( | ||
email: string | ||
): Promise<void> { | ||
const message = { | ||
from: { | ||
name: "Gabriel Hubert", | ||
email: "[email protected]", | ||
}, | ||
subject: "[Dust] Your Pro plan trial has been cancelled early", | ||
html: `<p>Hi,</p> | ||
<p>I'm Gabriel, a cofounder of Dust. Thanks for trying us out with a free trial of the Pro Plan.</p> | ||
<p>You've not used core features of the product (adding data sources, creating custom assistants) and you haven't used assistant conversations in the past 7 days. | ||
As a result, to avoid keeping your payment method on file while you may not intend to convert to our paid plan, we've cancelled your trial ahead of time and won't be charging you.</p> | ||
<p>If you did intend to continue on Dust, you can sign up again and your trial will pick up where you left off, with 3 days to go before converting to our paid plan. | ||
If you'd like to extend further, feel free to just email me.</p> | ||
<p>Thanks again for trying Dust out. If you have a second, please let me know if you have any thoughts about what we could do to improve Dust for your needs!</p> | ||
Gabriel`, | ||
}; | ||
|
||
return sendEmail(email, message); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters