Repository navigation
[Share By Email] Add an optional default recipient - #558
Merged
Alkarex merged 1 commit intoOct 27, 2026
Merged
Conversation
Users who mostly share articles with the same address (e.g. their own mailbox or a read-later service) have to type it again every time. Add a "Default recipient" email field to the extension configuration, stored in the `share_by_email_default_recipient` user attribute, and use it to prefill the "To" field of the sharing form. The field can still be edited before sending, and leaving the setting empty keeps the current behaviour. The address is validated with PHPMailer in the same way FreshRSS core validates user email addresses; an invalid address is rejected with the core "invalid email" message and the previous value is kept. Add translations for all supported languages, document the option in the README and bump the extension version to 0.5.0. Fixes FreshRSS#129
Alkarex
approved these changes
Oct 27, 2026
Member
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
share_by_email_default_recipientuser attributeuserController::validateEmailAddress()); an invalid address is rejected with the coreuser.email.feedback.invalidmessage and the previous value is keptFixes #129
Validation
End-to-end on a local FreshRSS
edgeinstance (PHP 8.2 built-in server, SQLite) with the extension enabled:bob@example.net: stored, shown on the configuration page and prefilled in the sharing formnot-an-email: redirected back to the configuration page with an error, previous value kepto'brien&co@example.net: stored as-is and correctly HTML-escaped in both formscarol@example.net: trimmedStatic checks:
composer run-script php-lint,composer run-script phtml-lint,phpcs,phpstan(with../FreshRSS), andmarkdownlint-cli2on the README.