Skip to content

feat(email): Add reply-to header support for Bento emails (#13)#40

Open
ziptied wants to merge 3 commits into
bentonow:masterfrom
ziptied:master
Open

feat(email): Add reply-to header support for Bento emails (#13)#40
ziptied wants to merge 3 commits into
bentonow:masterfrom
ziptied:master

Conversation

@ziptied

@ziptied ziptied commented Jan 21, 2026

Copy link
Copy Markdown
Contributor

Implement reply-to header parsing and forwarding for Bento transactional emails. Add new configuration option to enable or disable reply-to header support. Enhance email header parsing to extract headers from various input formats.

Implement reply-to header parsing and forwarding for Bento
transactional emails. Add new configuration option to enable or
disable reply-to header support. Enhance email header parsing to
extract headers from various input formats.
@greptile-apps

greptile-apps Bot commented Jan 21, 2026

Copy link
Copy Markdown

Confidence score: 4/5

  • This PR is safe to merge with minimal risk of breaking existing functionality
  • Score reflects well-structured code with proper testing, but deducted one point due to potential edge cases in header parsing and lack of validation for malformed reply-to email addresses
  • Pay close attention to inc/events-controllers/class_bento_email_handler.php for the header parsing logic

* feat(email): Add reply-to header support for Bento emails

Implement reply-to header parsing and forwarding for Bento
transactional emails. Add new configuration option to enable or
disable reply-to header support. Enhance email header parsing to
extract headers from various input formats.

* feat(email): Improve email recipient and header parsing

Enhance email handling by adding robust recipient normalization,
email validation, and reply-to parsing. Implement stricter input
validation and error handling to prevent potential issues with
malformed email addresses and headers.

Key improvements:
- Add recipient normalization method
- Validate email addresses
- Improve reply-to header parsing
- Add logging for invalid recipient scenarios
- Ensure consistent email address formatting
* feat(email): Add reply-to header support for Bento emails

Implement reply-to header parsing and forwarding for Bento
transactional emails. Add new configuration option to enable or
disable reply-to header support. Enhance email header parsing to
extract headers from various input formats.

* feat(email): Improve email recipient and header parsing

Enhance email handling by adding robust recipient normalization,
email validation, and reply-to parsing. Implement stricter input
validation and error handling to prevent potential issues with
malformed email addresses and headers.

Key improvements:
- Add recipient normalization method
- Validate email addresses
- Improve reply-to header parsing
- Add logging for invalid recipient scenarios
- Ensure consistent email address formatting
@greptile-apps

greptile-apps Bot commented Jan 21, 2026

Copy link
Copy Markdown

Confidence score: 4/5

  • This PR appears safe to merge with only minor potential concerns around edge case handling
  • Score reflects solid test coverage and thoughtful implementation, but deducted one point due to complex string parsing logic that could have edge cases and the default opt-out behavior that changes existing email handling
  • Pay close attention to inc/events-controllers/class_bento_email_handler.php for the header parsing logic and fallback handling

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

update_option('bento_email_queue', [[
'email_data' => $email,
'timestamp' => time(),
'hash' => md5('jane@example.com,john@example.com|Subject'),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: Hash calculation may not match the actual implementation if recipient normalization happens before hashing. Does the hash calculation in the handler use the original 'to' field or the normalized recipient list?

Prompt To Fix With AI
This is a comment left during a code review.
Path: tests/Unit/BentoEmailHandlerTest.php
Line: 202:202

Comment:
**logic:** Hash calculation may not match the actual implementation if recipient normalization happens before hashing. Does the hash calculation in the handler use the original 'to' field or the normalized recipient list?

How can I resolve this? If you propose a fix, please make it concise.

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