- Issue created by @bohart
- First commit to issue fork.
- Merge request !73Issue #3405263: Added checking whether the html_body is already in html format and, in this case, adding the reroute text after the body tag. β (Merged) created by abyss
- Status changed to Needs review
12 months ago 6:24pm 30 November 2023 - πΊπ¦Ukraine abyss
@bohart I added checking whether the html_body is already in html format and, in this case, adding the reroute text after the body tag.
- Status changed to Needs work
12 months ago 6:52pm 30 November 2023 - πΊπ¦Ukraine bohart Lutsk, Ukraine
Hi @Abyss,
1)
<body>
can have classes, styles, or some additional attributes.
In this case, the code will not work correctly.
Let's use preg_match / preg_replace for the proper check and insertion.2) If we insert the text inside
<body>
tag, we should wrap our plain text with<br/>
tags to have the correct displaying in the email.
Once we do this, let's update RerouteEmailHandlerPluginInterface::prependBody method description by adding the proper @params for consistency (it should say that the prepend text value should be a plain text).3) Please rename the input argument for the method
prependBody
fromstring $body
tostring $prepend
. Because it's a bit confusing now (as it is not actually an email body value).
Also, let's update the method description in the interface (it says "Set email body." right now, and this is not correct; it should be something like this "Prepends the specified text to the email body.")./** * Prepends the specified text to the email body. * * @param string $prepend * A plain text to be prepended to the email body. Line break tags will be added automatically in the case of HTML emails. */ public function prependBody(string $prepend): void;
- Assigned to abyss
- Status changed to Active
12 months ago 7:43pm 30 November 2023 - Issue was unassigned.
- Status changed to Needs review
12 months ago 7:44pm 30 November 2023 - πΊπ¦Ukraine abyss
@bohart I updated to add a replay message to the existing html body and updated the description for the prependBody method.
-
bohart β
committed a21d0b60 on 2.3.x authored by
Abyss β
Issue #3405263 by Abyss, bohart: Updated "prependBody" method's logic to...
-
bohart β
committed a21d0b60 on 2.3.x authored by
Abyss β
- Status changed to Fixed
12 months ago 9:55pm 30 November 2023 - πΊπ¦Ukraine bohart Lutsk, Ukraine
Committed to 2.3.x dev branch. It will be a part of the next 2.3 series releases.
Thanks! Automatically closed - issue fixed for 2 weeks with no activity.