Emails
GiftWrapt optionally sends a handful of transactional emails: password resets, new-comment notifications, day-of birthday reminders, post-birthday gift summaries, post-Christmas summaries, and configurable pre-event reminders. All outbound mail goes through Resend.
Setting It Up
Section titled “Setting It Up”Three environment variables, all optional but all needed together to actually send mail:
RESEND_API_KEY=re_...RESEND_FROM_EMAIL=giftwrapt@yourdomain.exampleRESEND_FROM_NAME=GiftWrapt # optional, defaults to the from-emailRESEND_BCC_ADDRESS=ops@yourdomain # optional, BCC's every send for auditOnce these are set and the server restarts, the admin Email page (/admin/email) surfaces the email-family toggles and a “Send test email” button you can use to verify delivery end-to-end.
What Gets Sent
Section titled “What Gets Sent”Each category has its own admin toggle, all independent. Disabling a toggle stops the email; it never stops the underlying side-effect (the reveal flow still runs, claims still get archived, etc.).
- Password reset - sent when a user clicks “forgot password.” Always on when email is configured; not gated by a separate toggle.
Comment Notifications
Section titled “Comment Notifications”enableCommentEmails- gates every comment email. When someone comments on an item, the list owner is notified (never about their own comments). When a comment @mentions someone, that person is notified too, including when the mention is added by editing an existing comment. Guardians of a child account get a copy of any comment email sent to that child. Each person gets at most one email per comment, and the commenter never gets one.
Orphaned-Claim Alerts
Section titled “Orphaned-Claim Alerts”Two emails support the orphaned-claim flow. Both fire whenever email is configured - there’s no admin toggle. Spoiler protection and claim integrity are non-negotiable, same rationale as the auto-archive happening regardless of email toggles:
- Initial alert - sent immediately when the recipient deletes an item the giftgiver had already claimed. Goes to the primary giftgiver and their partner; co-gifters intentionally silent. One email per orphaned item per audience member.
- Day-before cleanup reminder - sent the day before the auto-cleanup cron hard-deletes an unanswered orphan. One-shot per claim, idempotent via
giftedItems.orphanReminderSentAt.
Day-Of and Post-Event
Section titled “Day-Of and Post-Event”enableBirthdayEmails- gates both the day-of birthday email and the post-birthday gifter summary (the recap of who got what).enableChristmasEmails- post-Christmas owner summary, fired by the auto-archive cron after Dec 25.enableGenericHolidayEmails- same as above, but for admin-configured custom holidays.
Pre-Event Reminders
Section titled “Pre-Event Reminders”These broadcast to every user, including users without a list - the explicit intent is to nudge people to make one. Each has a master toggle and a lead-days knob:
- Birthday reminders (
enableBirthdayReminderEmails,birthdayReminderLeadDays) - per user, fires N days before their birthday. - Christmas reminders (
enableChristmasReminderEmails,christmasReminderLeadDays) - global, fires N days before Dec 25. - Holiday reminders (
enableHolidayReminderEmails,holidayReminderLeadDays) - per admin-configured holiday.
Reminder emails are also gated by the corresponding list-type master toggle, so disabling the Christmas list type silences its reminder too.
Relationship Reminders
Section titled “Relationship Reminders”Four independent families with their own master toggles and lead-days settings:
- Mother’s Day - sent to users who have tagged at least one other user as a mother they shop for.
- Father’s Day - same, for fathers.
- Valentine’s Day - sent to partnered users ahead of Valentine’s Day in the configured country (June 12 in Brazil, Feb 14 elsewhere).
- Anniversary - sent to both partners using the optional anniversary date on their profile.
Mother’s Day, Father’s Day, and Valentine’s Day use the country configured under relationshipRemindersCountry (default US). Anniversary reminders follow each couple’s own date.
Gift Picks in Reminders
Section titled “Gift Picks in Reminders”Turn on Include Gift Picks (enableReminderPicks, off by default) and each of these reminders also lists up to three things still open on the person’s lists, most wanted first, each linked to the item. It is plain ranking by priority, with no AI involved.
- Picks are built from what the reader can see. Someone with restricted access gets picks only from the items they can see, and nobody gets picks from a list they cannot open.
- The email says what is still open and nothing about who claimed anything else.
- A copy of a child’s reminder also goes to their guardians. Those copies never include picks, because a guardian is often the very person the reminder is about.
- When nothing is open, the reminder is sent exactly as before.
Sender Setup
Section titled “Sender Setup”For deliverability, the from-address domain needs verified SPF, DKIM, and DMARC records on the Resend side. Resend’s docs walk through it; once your domain is verified, just paste the from-address into RESEND_FROM_EMAIL and you’re done.
If you only want to test, Resend lets you use their sandbox domain - but mail can only be sent to the address that owns the Resend account.