Repository navigation
Conversation
The resend-mail endpoint now accepts an optional receiver parameter (list of e-mail addresses, optionally in "Name <mail@example.com>" format). When provided, the To header of the rebuilt email is replaced before sending. Invalid addresses are rejected with a 400 error. Refs: #143 Co-authored-by: xai <xai@shyim.de>
Clicking "Resend mail" on the mail archive detail page now opens a
modal pre-filled with the current recipients, so the e-mail address can
be corrected (e.g. typos) or replaced before resending. Confirming the
modal sends the adjusted recipient list to the resend-mail endpoint.
Note: the example address in the help text snippet escapes the @ sign
as {'@'} because a bare @ is parsed as vue-i18n linked message syntax
and breaks message compilation.
Closes: #143
Co-authored-by: xai <xai@shyim.de>
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.
Closes #143
What
Clicking Resend mail on the mail archive detail page now opens a modal that is pre-filled with the current recipients. The recipient list can be adjusted — e.g. to fix a typo in the e-mail address, which is the most common reason a mail could not be delivered — before the mail is actually resent.
How
Backend (
MailArchiveController::resend)resend-mailAPI action accepts a new optionalreceiverparameter: a non-empty list of e-mail addresses, each either a plain address or inName <mail@example.com>format (parsed viaSymfony\Component\Mime\Address::create()).Toheader of the rebuilt email is replaced before sending — works for both the EML-based and the database-based rebuild path.400response (MAIL_ARCHIVE__PARAMETER_INVALID_RECEIVER).Administration (detail page)
sw-modalwith asw-tagged-fieldpre-filled with the current recipients (keeping their display names), a cancel and a confirm button.en-GB/de-DEsnippets for the modal.Note on the help text snippet
The example address in the help text escapes the
@as{'@'}: a bare@inside a message is parsed as vue-i18n linked message syntax and makes the message compiler throw (INVALID_LINKED_FORMAT), which prevented the modal from rendering. This was verified against the vue-i18n 9 (Shopware 6.6) and 10 (Shopware 6.7) runtimes.Testing
Verified on a real Shopware 6.7.14 installation with the plugin installed:
resent, new archive entry created with the corrected receiver, display name preserved,source_mail_idlinked to the original mail.400 MAIL_ARCHIVE__PARAMETER_INVALID_RECEIVER.receiverparameter: unchanged behavior (backwards compatible).Max Mustermann <max.mustermann@exmaple.com>, address corrected tomax.mustermann@example.com, resend succeeds, resend history shows the newsententry.phpstanlevel max passes againstshopware/core~6.6.0 and ~6.7.0; administration JS passes the shopware-cli prettier config; snippet key parity betweenen-GBandde-DEverified (CIcheck-snippets).Resend modal pre-filled with current recipient
Success notification and updated resend history
resend_modal_change_recipient_flow.mp4
To show artifacts inline, enable in settings.