Skip to content

Commit

Permalink
Add docs for admin mailer
Browse files Browse the repository at this point in the history
  • Loading branch information
scosman committed Jul 25, 2024
1 parent fad94df commit a70edfa
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,16 @@ If you prefer another host you can explore alternatives:
- [Community adapters](https://sveltesociety.dev/components#adapters) including Github pages, AppEngine, Azure, and more
- [Supabase](https://supabase.com/docs/guides/getting-started/quickstarts/sveltekit) if you want one host for everything. Note: they do charge $10 a month for custom domains, unlike Cloudflare.
## Setup Admin Emailer -- Optional
SaaS Starter includes an admin emailer for sending yourself email notifications when important events happen, such as a new user creating their profile. This let's you monitor your app and respond to users without watching the database.
Provide email SMTP credientials in your environment variables: `PRIVATE_SMTP_HOST`, `PRIVATE_SMTP_PORT`, `PRIVATE_SMTP_USER`, `PRIVATE_SMTP_PASS`. You can use any SMTP providers such as Gmail, Sendgrid, AWS SES, Resend, or Mailgun.
Set the email address which admil emails will be sent to in `PRIVATE_ADMIN_EMAIL`.
You can add additional calls to sendAdminEmail() for any other events you want to monitor.
## Add Your Content
After the steps above, you’ll have a working version like the demo page. However, it’s not branded, and doesn’t have your content. The following checklist helps you customize the template to make a SaaS homepage for your company.
Expand Down
10 changes: 10 additions & 0 deletions local_env_template
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
# Supabase settings
PUBLIC_SUPABASE_URL='https://REPLACE_ME.supabase.co'
PUBLIC_SUPABASE_ANON_KEY='REPLACE_ME'
PRIVATE_SUPABASE_SERVICE_ROLE='REPLACE_ME'

# Stripe settings
PRIVATE_STRIPE_API_KEY='REPLACE_ME'

# SMTP settings for email - optional
# PRIVATE_ADMIN_EMAIL='[email protected]' # see lib/admin_mailer.ts
# PRIVATE_SMTP_HOST='REPLACE_ME'
# PRIVATE_SMTP_PORT='587'
# PRIVATE_SMTP_USER='REPLACE_ME'
# PRIVATE_SMTP_PASS='REPLACE_ME'

0 comments on commit a70edfa

Please sign in to comment.