Skip to content

[5.4] Fix mass mail fails due to long message lines exceeding SMTP limits#47410

Open
sonirupali028-dev wants to merge 7 commits intojoomla:5.4-devfrom
sonirupali028-dev:fix-massmail-body-line-length
Open

[5.4] Fix mass mail fails due to long message lines exceeding SMTP limits#47410
sonirupali028-dev wants to merge 7 commits intojoomla:5.4-devfrom
sonirupali028-dev:fix-massmail-body-line-length

Conversation

@sonirupali028-dev
Copy link
Copy Markdown

@sonirupali028-dev sonirupali028-dev commented Mar 17, 2026

Pull Request resolves #47364

  • I read the Generative AI policy and my contribution is either not created with the help of AI or is compatible with the policy and GNU/GPL 2 or later.

Summary

Fixes the issue where mass mail fails due to long unbroken message lines exceeding SMTP limits.

Changes

  • Added word wrapping to the message body before sending emails
  • Ensures compliance with SMTP line length limits (998 characters)

Testing

  • Tested with a long unbroken message body
  • Emails are sent successfully without errors.

Actual result BEFORE applying this Pull Request

  • Emails with long unbroken lines would fail.

Expected result AFTER applying this Pull Request

  • Emails with long unbroken lines are sent successfully, respecting SMTP limits

Link to documentations

Please select:

  • Documentation link for guide.joomla.org:

  • No documentation changes for guide.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

Comment thread plugins/multifactorauth/email/src/Extension/Email.php Outdated
Comment thread plugins/multifactorauth/email/src/Extension/Email.php Outdated
@brianteeman
Copy link
Copy Markdown
Contributor

Please update the description with the number of the issue that this resolves.

@richard67
Copy link
Copy Markdown
Member

Please update the description with the number of the issue that this resolves.

@sonirupali028-dev To be more precise: Currently your PR references itself instead of the issue.

Pull Request resolves #47410.

@sonirupali028-dev
Copy link
Copy Markdown
Author

@richard67, @brianteeman, Thanks for the suggestion. I’ve updated the PR description to correctly reference the issue using “Fixes #47410” and addressed the requested changes. Please let me know if anything else needs to be improved.

@richard67
Copy link
Copy Markdown
Member

@richard67, @brianteeman, Thanks for the suggestion. I’ve updated the PR description to correctly reference the issue using “Fixes #47410” and addressed the requested changes. Please let me know if anything else needs to be improved.

@sonirupali028-dev It seems you did not understand. You have changed the place of the reference, but you are still referring to this PR #47410 instead of the issue #47364 . Please change it back to like it was before, and change the #47410 to #47364 .

@sonirupali028-dev
Copy link
Copy Markdown
Author

@richard67 Thanks for the clarification. I’ve corrected the issue reference to “Fixes #47364”. Please let me know if it’s correct now.

@richard67
Copy link
Copy Markdown
Member

@richard67 Thanks for the clarification. I’ve corrected the issue reference to “Fixes #47364”. Please let me know if it’s correct now.

@sonirupali028-dev The reference to the issue is right now, but I would prefer to have it where our pull request template suggest it to be, at the top of the PR like you can see it in other PRs, before the AI policy check:

Pull Request resolves #47364 .

And you should check the check boxes at the bottom of the PR for the documentation. You have checked:

[X] Documentation link for guide.joomla.org:

[ ] No documentation changes for guide.joomla.org needed

[X] Pull Request link for manual.joomla.org:

[X] No documentation changes for manual.joomla.org needed

If you check one of the 2 documentation pull request link check boxes, you also have to provide the link to the PR for the documentation change, and checking both the documentation pull request link check box and the no documentation changes check box for one kind of documentation (in your case the 3rd and the 4th check boxes) together makes no sense at all.

As your PR will not require any documentation changes, it should be:

[ ] Documentation link for guide.joomla.org:

[X] No documentation changes for guide.joomla.org needed

[ ] Pull Request link for manual.joomla.org:

[X] No documentation changes for manual.joomla.org needed

@sonirupali028-dev
Copy link
Copy Markdown
Author

@richard67 Thanks for the clarification. I’ve corrected the issue reference to “Fixes #47364”. Please let me know if it’s correct now.

@sonirupali028-dev The reference to the issue is right now, but I would prefer to have it where our pull request template suggest it to be, at the top of the PR like you can see it in other PRs, before the AI policy check:

Pull Request resolves #47364 .

And you should check the check boxes at the bottom of the PR for the documentation. You have checked:

[X] Documentation link for guide.joomla.org:
[ ] No documentation changes for guide.joomla.org needed
[X] Pull Request link for manual.joomla.org:
[X] No documentation changes for manual.joomla.org needed

If you check one of the 2 documentation pull request link check boxes, you also have to provide the link to the PR for the documentation change, and checking both the documentation pull request link check box and the no documentation changes check box for one kind of documentation (in your case the 3rd and the 4th check boxes) together makes no sense at all.

As your PR will not require any documentation changes, it should be:

[ ] Documentation link for guide.joomla.org:
[X] No documentation changes for guide.joomla.org needed
[ ] Pull Request link for manual.joomla.org:
[X] No documentation changes for manual.joomla.org needed

@richard67 Thank you for the detailed guidance and for helping me understand the correct approach. I’ve updated the PR accordingly and will keep these points in mind going forward. Please let me know if everything looks good now.

@richard67 richard67 changed the title Fix: Mass mail fails due to long message lines exceeding SMTP limits [5.4] Fix mass mail fails due to long message lines exceeding SMTP limits Mar 18, 2026
@richard67 richard67 added the bug label Mar 18, 2026
@richard67
Copy link
Copy Markdown
Member

@sonirupali028-dev From a formal point of view the PR is correct now. I've allowed myself to remove the heading style from the issue reference and to adjust the PR title. Now it needs 2 successful human tests before it can be set to RTC (ready to commit).

@sonirupali028-dev
Copy link
Copy Markdown
Author

@richard67 Thank you for the review and for refining the PR. I’ll wait for the required human tests. If needed, I’m also happy to assist with testing.

@brianteeman
Copy link
Copy Markdown
Contributor

I am concerned as the op has stated that they have not rep[icated the error or tested the solution as they havent even installed Joomla.All of those are basic requirements of any pull request

@sonirupali028-dev
Copy link
Copy Markdown
Author

@brianteeman sorry for the late update.

I’ve set up Joomla locally and tried testing the mass mail feature. I created a message with a very long single line to understand the issue better.

While testing, I couldn’t actually send the email because my local setup doesn’t have a working mail server I got errors like “Could not instantiate mail function” and “Could not connect to SMTP host”.

I’ll work on setting up a proper SMTP configuration so I can test this more completely, then update here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ 5.4.3] Mass Mail User - message has lines too long for transport

4 participants