Skip to content

Add notification email opt-in with branded email templates#304

Merged
simonhamp merged 3 commits intomainfrom
notification-email-opt-in
Mar 28, 2026
Merged

Add notification email opt-in with branded email templates#304
simonhamp merged 3 commits intomainfrom
notification-email-opt-in

Conversation

@simonhamp
Copy link
Copy Markdown
Member

@simonhamp simonhamp commented Mar 28, 2026

Summary

  • Adds a receives_notification_emails column to the users table, allowing users to opt in/out of receiving notification emails
  • Registers a SuppressMailNotificationListener that checks the user's preference and suppresses the mail channel when opted out
  • Publishes and customizes Laravel mail templates with NativePHP branding (PNG logo for better email client compatibility)
  • Updates all notifications to support the database channel alongside mail
  • Adds a toggle in the customer settings UI for controlling notification email preferences
  • Removes unused TestNotification and SendTestEmail command

Test plan

  • SuppressMailNotificationListenerTest covers suppression logic
  • SettingsTest covers the opt-in toggle
  • NotificationsTest updated to remove TestNotification reference
  • Verify email rendering with PNG logo across email clients
  • Verify toggling the setting on/off correctly suppresses/allows emails

🤖 Generated with Claude Code

simonhamp and others added 3 commits March 28, 2026 12:39
- Add receives_notification_emails column to users table
- Add SuppressMailNotificationListener to respect user email preferences
- Publish and customize mail templates with NativePHP branding (PNG logo)
- Update all notifications to support database channel
- Add settings UI for toggling notification emails
- Remove TestNotification and SendTestEmail command
- Add tests for suppression listener and settings

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…gin Marketplace

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@simonhamp simonhamp marked this pull request as ready for review March 28, 2026 13:35
@simonhamp simonhamp merged commit b455b4b into main Mar 28, 2026
2 checks passed
@simonhamp simonhamp deleted the notification-email-opt-in branch March 28, 2026 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant