Skip to content

Commit

Permalink
test CF
Browse files Browse the repository at this point in the history
  • Loading branch information
scosman committed Jul 25, 2024
1 parent 1fbd525 commit 6eb3369
Show file tree
Hide file tree
Showing 5 changed files with 419 additions and 146 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,11 +275,13 @@ If you prefer another host you can explore alternatives:
SaaS Starter includes an admin emailer for sending yourself email notifications when important events happen. This let's you monitor your app and respond to users without watching the database.
If you setup the admin emailer, it will email you when users create their profile or the 'Contact Us' form is submitted. You can add additional calls to sendAdminEmail() for any other events you want to monitor.
If you setup the admin emailer, it will email you when users create their profile, or when the 'Contact Us' form is submitted. You can add additional calls to sendAdminEmail() for any other events you want to monitor.
**Not supported on Cloudflare Workers**: the admin emailer is not supported on Cloudflare Workers as it does not have a full node.js environment.
To setup, set these environment variables:
To setup, first set the email address to which admin emails will be sent in the env var `PRIVATE_ADMIN_EMAIL`. Then 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.
- `PRIVATE_ADMIN_EMAIL`: the email address to which admin emails will be sent.
- `PRIVATE_FROM_ADMIN_EMAIL`: the email address to use as the from address for admin emails (defaults to `PRIVATE_ADMIN_EMAIL` if not set).
- `PRIVATE_RESEND_API_KEY`: a https://resend.com API key. Note, you'll need to verify your domain with them before you can use their service.
## Add Your Content
Expand Down
10 changes: 4 additions & 6 deletions local_env_template
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ 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'
# settings for email - optional
# PRIVATE_ADMIN_EMAIL='[email protected]'
# PRIVATE_FROM_ADMIN_EMAIL='REPLACE_ME'
# PRIVATE_RESEND_API_KEY='REPLACE_ME'
Loading

0 comments on commit 6eb3369

Please sign in to comment.