Commit Graph

2686 Commits

Author SHA1 Message Date
Marcus Bointon 7e3f24386f
Merge pull request #3288 from RobinvanderVliet/patch-1
Improve memory usage when sending large attachments
2025-12-22 14:31:02 +00:00
Robin van der Vliet 1a0004b51b
Improve memory usage when sending large attachments 2025-12-22 15:08:17 +01:00
Marcus Bointon a969e57c06
Merge pull request #3287 from PHPMailer/dependabot/github_actions/actions/upload-artifact-6.0.0
GH Actions: Bump actions/upload-artifact from 5.0.0 to 6.0.0
2025-12-20 23:09:19 +00:00
Marcus Bointon 28caa24930
Merge pull request #3286 from PHPMailer/dependabot/github_actions/action-runners-197cbf0a63
GH Actions: Bump the action-runners group with 3 updates
2025-12-20 23:08:37 +00:00
dependabot[bot] 5f710689e5
GH Actions: Bump actions/upload-artifact from 5.0.0 to 6.0.0
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 5.0.0 to 6.0.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](330a01c490...b7c566a772)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: 6.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-20 22:26:48 +00:00
dependabot[bot] 827e170f50
GH Actions: Bump the action-runners group with 3 updates
Bumps the action-runners group with 3 updates: [JamesIves/github-pages-deploy-action](https://github.com/jamesives/github-pages-deploy-action), [github/codeql-action](https://github.com/github/codeql-action) and [codecov/codecov-action](https://github.com/codecov/codecov-action).


Updates `JamesIves/github-pages-deploy-action` from 4.7.4 to 4.7.6
- [Release notes](https://github.com/jamesives/github-pages-deploy-action/releases)
- [Commits](4a3abc783e...9d877eea73)

Updates `github/codeql-action` from 4.31.7 to 4.31.9
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](cf1bb45a27...5d4e8d1aca)

Updates `codecov/codecov-action` from 5.5.1 to 5.5.2
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](5a1091511a...671740ac38)

---
updated-dependencies:
- dependency-name: JamesIves/github-pages-deploy-action
  dependency-version: 4.7.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: action-runners
- dependency-name: github/codeql-action
  dependency-version: 4.31.9
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: action-runners
- dependency-name: codecov/codecov-action
  dependency-version: 5.5.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: action-runners
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-20 22:26:44 +00:00
Marcus Bointon 84097ce614
Merge pull request #3285 from jrfnl/feature/dependabot-every-two-weeks
Dependabot/gh-actions: move to bi-weekly schedule
2025-12-08 14:00:32 +01:00
jrfnl 7ff3620f50
Dependabot/gh-actions: move to bi-weekly schedule
👉 Important: this is for **version** updates only, not for security updates, which are handled separately and don't depend on this configuration.

---

PR 3229 updated the GitHub Actions workflows used in this repo to use "pinned" versions for external action runners to improve workflow security.

The current "frequency" is weekly. As these updates are rarely time-sensitive, it should be fine to receive them less frequently.

This commit tries to make it so by changing the Dependabot schedule for GitHub Actions to once every two weeks and late in the day when the queue should be mostly empty (as long as it's not a Monday), so the update PR will come in on a more predictable schedule.
2025-12-08 12:36:18 +01:00
Marcus Bointon 85df414ab4
Merge pull request #3284 from PHPMailer/dependabot/github_actions/action-runners-a03ee4dddf
GH Actions: Bump the action-runners group across 1 directory with 3 updates
2025-12-08 08:47:27 +01:00
dependabot[bot] d04efe78e1
GH Actions: Bump the action-runners group across 1 directory with 3 updates
Bumps the action-runners group with 3 updates in the / directory: [actions/checkout](https://github.com/actions/checkout), [github/codeql-action](https://github.com/github/codeql-action) and [shivammathur/setup-php](https://github.com/shivammathur/setup-php).


Updates `actions/checkout` from 6.0.0 to 6.0.1
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](1af3b93b68...8e8c483db8)

Updates `github/codeql-action` from 4.31.4 to 4.31.7
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](e12f017898...cf1bb45a27)

Updates `shivammathur/setup-php` from 2.35.5 to 2.36.0
- [Release notes](https://github.com/shivammathur/setup-php/releases)
- [Commits](bf6b4fbd49...44454db4f0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 6.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: action-runners
- dependency-name: github/codeql-action
  dependency-version: 4.31.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: action-runners
- dependency-name: shivammathur/setup-php
  dependency-version: 2.36.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: action-runners
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-08 06:02:37 +00:00
Marcus Bointon 360ae911ce
7.0.1 2025-11-25 08:18:09 +01:00
Marcus Bointon 6db653f5a8
Changelog 2025-11-25 08:16:03 +01:00
Marcus Bointon 2050f506c3
Deprecate version constants in SMTP and POP3 classes; they will always be the same as PHPMailer:VERSION 2025-11-25 08:08:54 +01:00
Marcus Bointon 6631e9049e
Merge pull request #3276 from jrfnl/feature/use-phpcompatibility-10.0
Use PHPCompatibility 10.0.0(-alpha1)
2025-11-25 07:58:05 +01:00
Marcus Bointon 12494b1830
Fix syntax 2025-11-24 18:17:31 +01:00
Marcus Bointon 381c209df1
Switch away from the IMAP functions, suggest using an IMAP library instead, and update the example to do that 2025-11-24 18:12:56 +01:00
jrfnl 57ef8c914f
Escape special characters the same way in all PHP versions
The `htmlspecialchars()` function is used to escape arbitrary text strings for display.

Original the default for the `$flags` parameter of that function in PHP was `ENT_COMPAT`, which translates to "convert double quotes to `&quot;` and leave single quotes alone".

As of PHP 8.1, the default value for the `$flags` parameter has been made more robust and was changed to `ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401`, which translates to "convert both double and single quotes, replace invalid code unit sequences with a Unicode Replacement Character and treat code as HTML 4.01".

For code to provide the same/predictable output cross-version PHP, the `$flags` parameter should be explicitly set and what with the new default value being the more robust one, this commit adds that value for `$flags` in all instances of function calls to `htmlspecialchars()`.

Once the application minimum PHP version is PHP 8.1 or higher, the parameter can be removed again (as the value will then be the same as the default parameter value).

Ref: https://www.php.net/manual/en/function.htmlspecialchars.php
2025-11-24 10:50:37 +01:00
Marcus Bointon 6dc895d1d9
Merge pull request #3278 from PHPMailer/dependabot/github_actions/actions/checkout-6.0.0
GH Actions: Bump actions/checkout from 5.0.0 to 6.0.0
2025-11-24 10:03:09 +01:00
Marcus Bointon 127dde31e2
Merge pull request #3277 from PHPMailer/dependabot/github_actions/action-runners-4b98d4914e
GH Actions: Bump github/codeql-action from 4.31.2 to 4.31.4 in the action-runners group
2025-11-24 10:02:32 +01:00
dependabot[bot] 606c699536
GH Actions: Bump actions/checkout from 5.0.0 to 6.0.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 5.0.0 to 6.0.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](08c6903cd8...1af3b93b68)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 6.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-24 06:03:12 +00:00
dependabot[bot] abe4691505
GH Actions: Bump github/codeql-action in the action-runners group
Bumps the action-runners group with 1 update: [github/codeql-action](https://github.com/github/codeql-action).


Updates `github/codeql-action` from 4.31.2 to 4.31.4
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](0499de31b9...e12f017898)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.31.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: action-runners
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-24 06:03:05 +00:00
Marcus Bointon 7284079a6d
Merge pull request #3275 from jrfnl/feature/cs-remove-superfluous-import-uses
Tests: remove unused import `use` statements
2025-11-23 23:23:24 +01:00
jrfnl b9d0e242fb
Examples/mailing_list: remove use of `E_STRICT`
While this is only example code, it is still code which should be functional for all supported PHP versions.

As `E_STRICT` has been deprecated since PHP 8.4 and wasn't really all that useful since PHP 7.0 anyway, it's probably better not to mention it in the example code.

Ref: https://wiki.php.net/rfc/deprecations_php_8_4#remove_e_strict_error_level_and_deprecate_e_strict_constant
2025-11-23 05:23:36 +01:00
jrfnl c24a4147cd
PHPCS: add a few more selective ignores
... for things already handled correctly in the code.
2025-11-23 05:23:36 +01:00
jrfnl 19fb4e2727
PHPCS/PHPCompatibility: favour inline ignores over blanket rule excludes
Best practice tweak regarding the use of PHPCompatibility.

It is strongly recommended to use inline ignore annotations when a reported issue is not a problem (because it is accompanied by a `function_exists()`, `defined()` or other check), instead of excluding a rule completely via the ruleset.

Blanket code-base wide ignores mean that:
* ... if a PR introduces new code (or changes existing code) which uses a non-cross-version compatible PHP feature...
* ... and the code doesn't have the right safeguards in place for cross-version compatibility...
* ... PHPCompatibility would not flag it because of the codebase wide ignore...
* ... which could cause problems for the end-users.

Selective, inline ignores ensure that only the annotated error is ignored and only for that specific bit of code, preventing the above described problem.

It also means that when something changes in PHP - like a deprecated method being removed -, you will be notified about the issue again so you can review if the current cross-version compatibility tweak is still the most optimal one.
2025-11-23 05:23:36 +01:00
jrfnl 051b81791f
CS: start using PHPCompatibility 10
Long anticipated, finally here: PHPCompatibility 10.0.0-alpha1 🎉

PHPCompatibility 10.0.0 brings huge improvements in both what is being detected (> 50 new sniffs), as well as the detection accuracy for pre-existing sniffs.

Even though still "unstable", it is stable enough for our purposes and the advantages of using it outweigh the disadvantage of it being an unstable version. By setting the `minimum-stability` and `prefer-stable` settings in the `composer.json`, we can ensure that we don't get the `dev-develop` branch, but rather get a `10.0.0` tag, unstable or not.

Includes updating the PHPCS version constraints to match.
Includes updating the exclusions in the ruleset for changes in the error codes due to further changes in PHP having been made (and now being detected).

Ref:
* https://github.com/PHPCompatibility/PHPCompatibility/wiki/Upgrading-to-PHPCompatibility-10.0
* https://github.com/PHPCompatibility/PHPCompatibility/releases/tag/10.0.0-alpha1
2025-11-23 05:23:22 +01:00
jrfnl d34204b729
Tests: remove unused import `use` statements 2025-11-23 04:49:42 +01:00
Marcus Bointon cc366ae351
Merge pull request #3272 from jrfnl/feature/ghactions-update-for-php-8.5-release
GH Actions: update for the release of PHP 8.5
2025-11-20 23:21:32 +01:00
jrfnl f5cc77c68a
GH Actions: update for the release of PHP 8.5
... which is expected to be released this Thursday.

* Builds against PHP 8.5 are no longer allowed to fail.
* Update PHP version on which code coverage is run (high should now be 8.5).
* Add _allowed to fail_ build against PHP 8.6.
* Update the README.

Note: for some jobs I use "nightly" for the "next" PHP version, for some `8.6`. While it may appear there is no difference and this is true for the better part of the year, there is a difference for about two months.

To illustrate, consider PHP 8.5:
* PHP "nightly" refers to the PHP `master` branch, so was PHP 8.5 until the PHP 8.5 was branched off when the first RC was cut in September.
* As of that moment, "nightly" basically became PHP 8.6, so to test against PHP 8.5, one would need to explicitly request `8.5`.
* As of the release of PHP 8.5, it is expected for "nightly" to be PHP 8.6, so the difference is moot again.

For that reason, the unit test workflow uses the explicit `8.6` version for PHP "next".
2025-11-18 21:12:43 +01:00
Marcus Bointon da2c9f9919
Merge pull request #3270 from jrfnl/feature/allow-test-runs-on-forks
GH Actions: allow test runs to succeed on fork
2025-11-13 21:18:11 +01:00
Marcus Bointon 5e41861a0e
Merge pull request #3269 from jrfnl/feature/composer-remove-roave-security-advisories
Composer: remove roave/security-advisories
2025-11-13 21:17:08 +01:00
jrfnl a0a3e6a3ef
GH Actions: allow test runs to succeed on fork
As things were, test runs on forks would always fail on the "upload code coverage reports" step, as forks (justifiably) don't have access to the `CODECOV_TOKEN`.

Fixed now by updating the conditions to run that step.
2025-11-13 20:43:39 +01:00
jrfnl 1645b1a7be
Composer: remove roave/security-advisories
The `roave/security-advisories` package was an inventive method to block installation of known insecure versions of other dependencies (via a `conflict` annotation).

As of Composer 2.9, using the `roave/security-advisories` package for this purpose is no longer needed as Composer will now natively block installation of known insecure versions of dependencies.

And while not all contributors to this repo may be using Composer 2.9+ (yet), Composer 2.9+ **_will_** be used in CI and CI failing on Composer blocking an insecure dependency offers the same level of protection as the package previously offered.

Refs:
* https://blog.packagist.com/composer-2-9/
* https://github.com/composer/composer/releases/tag/2.9.0
2025-11-13 20:15:45 +01:00
Marcus Bointon a522b78c67
Merge pull request #3267 from RobinvanderVliet/patch-1
Update Dutch translations
2025-11-10 14:53:39 +01:00
Robin van der Vliet a0ee4a34ed
Merge branch 'master' into patch-1 2025-11-10 13:34:14 +01:00
Marcus Bointon a39e1db862
Merge pull request #3268 from PHPMailer/dependabot/github_actions/action-runners-cf016e0bec
GH Actions: Bump JamesIves/github-pages-deploy-action from 4.7.3 to 4.7.4 in the action-runners group
2025-11-10 08:41:13 +01:00
dependabot[bot] 25658b754f
GH Actions: Bump JamesIves/github-pages-deploy-action
Bumps the action-runners group with 1 update: [JamesIves/github-pages-deploy-action](https://github.com/jamesives/github-pages-deploy-action).


Updates `JamesIves/github-pages-deploy-action` from 4.7.3 to 4.7.4
- [Release notes](https://github.com/jamesives/github-pages-deploy-action/releases)
- [Commits](6c2d9db40f...4a3abc783e)

---
updated-dependencies:
- dependency-name: JamesIves/github-pages-deploy-action
  dependency-version: 4.7.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: action-runners
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-10 06:03:18 +00:00
Robin van der Vliet d616c7fc76
Update Dutch translations 2025-11-07 23:25:43 +01:00
Marcus Bointon 15c3d21fa1
Merge pull request #3266 from RobinvanderVliet/patch-1
Recreate Esperanto translations
2025-11-07 23:05:03 +01:00
Robin van der Vliet b336ed18b5
Recreate Esperanto translations 2025-11-07 22:12:02 +01:00
Marcus Bointon 37d628dd22
Merge pull request #3264 from PHPMailer/dependabot/github_actions/action-runners-02cf758a13
GH Actions: Bump github/codeql-action from 4.31.0 to 4.31.2 in the action-runners group
2025-11-05 15:11:07 +01:00
dependabot[bot] 9aa8367be6
GH Actions: Bump github/codeql-action in the action-runners group
Bumps the action-runners group with 1 update: [github/codeql-action](https://github.com/github/codeql-action).


Updates `github/codeql-action` from 4.31.0 to 4.31.2
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](4e94bd11f7...0499de31b9)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.31.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: action-runners
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-03 06:03:34 +00:00
Marcus Bointon 4384c206d3
Merge pull request #3262 from greew/add-missing-da-lang
Added missing Danish translations
2025-10-29 10:46:09 +01:00
Jesper Skytte 8b7828d3b0
Added missing Danish translations 2025-10-29 09:42:18 +01:00
Marcus Bointon 8a06a2ddd1
Merge pull request #3261 from greew/master
Add XOAUTH2 token exception handling
2025-10-29 09:39:27 +01:00
Jesper Skytte 8f59b82488
Add XOAUTH2 token exception handling
If generating an OAuth2 token fails in the provider and an exception is thrown, we never catch that exception, but just let exception propagate up to whatever.

I suggest this change, such that we can handle errors when generating oauth tokens. It is based on the fact that ^League\OAuth2\Client\Provider\AbstractProvider` can throw exceptions during getting the oauth token, but we are nowhere near to knowing why.

I have decided on catching all exception (`\Exception`) because if someone uses another OAuthTokenProvider (it's just an interface, so it's possible), we won't know specifically which exceptions can be thrown here, so we need to catch them all.

By throwing a PHPMailer exception and adding the existing exception as the `$previous` variable, we can show a generic error message to regular users and advice how developers can get actually meaningful error messages from the previous exception.
2025-10-29 09:04:06 +01:00
Marcus Bointon eec5710309
Merge pull request #3252 from wera-as/master
Update phpmailer.lang-nb.php
2025-10-27 10:33:49 +01:00
Marcus Bointon a231b7d4c4 Fix missing newline at end of file in language file 2025-10-27 10:19:00 +01:00
Adrian Thomassen 74e7f4c72a Update phpmailer.lang-nb.php
Add missing strings without whitespace changes
2025-10-27 10:19:00 +01:00
Adrian Thomassen 07db4a7a0f Revert "Update phpmailer.lang-nb.php"
This reverts commit 102f7bfa4d.
2025-10-27 10:19:00 +01:00