Compare commits

..

1438 Commits

Author SHA1 Message Date
Marcus Bointon ebf1655bd5
7.0.2 2026-01-09 19:02:33 +01:00
Marcus Bointon b938991866
Merge pull request #3283 from SirLouen/patch/3282
Fixing troubles with mailSend and Sender enabled
2026-01-09 17:34:10 +00:00
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
SirLouen 0d4c5ee8da
fix: Correct sendmail_path validation to ensure proper formatting for sender address 2025-12-09 01:37:34 +01:00
SirLouen 14e1efe293
docs: Fixing array multiline syntax for sendmailPathProvider 2025-12-08 16:54:13 +01:00
SirLouen dca8e03946
fix: Add more causitry to testParseSendmailPath and nclude -oi with related tests 2025-12-08 16:48:09 +01: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
SirLouen 2b240b44e9
docs Update parseSendmailPath documentation to clarify parameter handling 2025-12-08 01:42:13 +01:00
SirLouen 4c06f874c9
fix: Refactor sendmail parameter handling and update related tests 2025-12-08 01:35:57 +01:00
SirLouen 4e8292f43c
fix: Refactor to fix linting issues in PHP 5.5 2025-12-07 19:11:59 +01:00
SirLouen 8d27fb6b7c
fix: Enhance sendmail parameter parsing, sendmailSend and add related unit tests 2025-12-07 19:05:45 +01:00
SirLouen 34b209f864
fix: Improve sendmail formatting logic and enhance related tests 2025-12-07 03:13:29 +01:00
SirLouen 31e3d491aa
fix: Correct sendmail path check logic in PHPMailer class 2025-12-07 02:00:54 +01:00
SirLouen 96d82b913a
fix: Update testMailSendWithSendmailParams to use example.org in sendmail path 2025-12-07 01:27:56 +01:00
SirLouen 8ff00047a8
docs: Add doc block to the testMailSendWithSendmailParams test 2025-12-06 17:44:11 +01:00
SirLouen a767d446c2
fix: Remove useless sendmail path check in testMailSend method 2025-12-06 17:05:27 +01:00
SirLouen b6729d7bd2
Fixing troubles with mailSend and Sender enabled 2025-12-06 16:56:00 +01: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
Adrian Thomassen 6f42027abe Update phpmailer.lang-nb.php
Refined the current translation and added missing strings
2025-10-27 10:19:00 +01:00
Marcus Bointon 494e8d60e4
Merge pull request #3259 from PHPMailer/dependabot/github_actions/action-runners-499cb248b3
GH Actions: Bump github/codeql-action from 4.30.9 to 4.31.0 in the action-runners group
2025-10-27 09:58:54 +01:00
Marcus Bointon ad20fe54b9
Merge pull request #3258 from PHPMailer/dependabot/github_actions/actions/upload-artifact-5.0.0
GH Actions: Bump actions/upload-artifact from 4.6.2 to 5.0.0
2025-10-27 09:58:31 +01:00
dependabot[bot] d9cf457a92
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.30.9 to 4.31.0
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](16140ae1a1...4e94bd11f7)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-27 06:32:22 +00:00
dependabot[bot] 060cf931c3
GH Actions: Bump actions/upload-artifact from 4.6.2 to 5.0.0
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.6.2 to 5.0.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](ea165f8d65...330a01c490)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-27 06:15:15 +00:00
Marcus Bointon 54a5a950dd
Merge pull request #3253 from PHPMailer/dependabot/github_actions/action-runners-ff6e0617b3
GH Actions: Bump github/codeql-action from 4.30.8 to 4.30.9 in the action-runners group
2025-10-20 10:15:39 +02:00
dependabot[bot] effe349964
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.30.8 to 4.30.9
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](f443b600d9...16140ae1a1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-20 06:11:04 +00:00
Marcus Bointon 22b1e59f53
Merge pull request #3248 from KaminskiDaniell/patch-3
Corrected Polish translation
2025-10-15 19:27:26 +02:00
Daniel Kamiński 5ef071ed30
Remove extra line 2025-10-15 19:21:14 +02:00
Daniel Kamiński e75e5ee3e3
Merge branch 'master' into patch-3 2025-10-15 19:19:38 +02:00
Marcus Bointon 36ea61cf21
Merge changes from 6.12.0 2025-10-15 19:01:55 +02:00
Marcus Bointon 8bc8f15714
Merge changes from 7.0.0 2025-10-15 19:01:45 +02:00
Marcus Bointon c523ee67a8
Merge changes from 7.0.0 2025-10-15 18:59:43 +02:00
Marcus Bointon c7111310c6
7.0.0 2025-10-15 18:40:02 +02:00
Daniel Kamiński d49feed6fd
Corrected Polish translation 2025-10-13 16:06:28 +02:00
Marcus Bointon b17101946b
Merge pull request #3247 from PHPMailer/dependabot/github_actions/github/codeql-action-4.30.8
GH Actions: Bump github/codeql-action from 3.30.6 to 4.30.8
2025-10-13 09:40:24 +02:00
dependabot[bot] 1cf86b0762
GH Actions: Bump github/codeql-action from 3.30.6 to 4.30.8
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.30.6 to 4.30.8.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](64d10c1313...f443b600d9)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.30.8
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-13 06:03:01 +00:00
Marcus Bointon 97ccd46848
Merge pull request #3036 from mariuszkrzaczkowski/patch-1
Add cid default domain
2025-10-06 09:55:06 +02:00
Mariusz Krzaczkowski 86b9838806
Merge branch 'PHPMailer:master' into patch-1 2025-10-06 09:38:53 +02:00
Marcus Bointon 46f72568d5
Changelog 2025-10-06 09:33:42 +02:00
Marcus Bointon ad2821203f
Unset From address to check default CID behaviour 2025-10-06 09:28:56 +02:00
Marcus Bointon 54b2ab00d3
Fix $cid assembly 2025-10-06 09:21:07 +02:00
Marcus Bointon 73afb4a8b1
Merge remote-tracking branch 'cid/patch-1' into patch-1 2025-10-06 09:11:15 +02:00
Marcus Bointon c09730a7d7
CS 2025-10-06 09:10:51 +02:00
Mariusz Krzaczkowski 306ea7022f
Update PHPMailer.php 2025-10-06 09:10:51 +02:00
Mariusz Krzaczkowski 0f9ebf7c3c
Update PHPMailerTest.php 2025-10-06 09:10:51 +02:00
Mariusz Krzaczkowski 6aad52aa06
Update PHPMailerTest.php 2025-10-06 09:10:51 +02:00
Mariusz Krzaczkowski 7a18c0bc98
Update PHPMailerTest.php 2025-10-06 09:10:51 +02:00
Mariusz Krzaczkowski 9489d4c5c3
Update PHPMailer.php 2025-10-06 09:10:51 +02:00
Mariusz Krzaczkowski 2e38fff8f3
Add cid default domain 2025-10-06 09:10:51 +02:00
Mariusz Krzaczkowski 9a5f46f747
Add cid default domain 2025-10-06 09:10:51 +02:00
Marcus Bointon 7251db8b19
CS 2025-10-06 09:07:54 +02:00
Marcus Bointon 27e89fabc3
Merge pull request #3245 from PHPMailer/dependabot/github_actions/action-runners-2eaf09b135
GH Actions: Bump the action-runners group with 2 updates
2025-10-06 08:44:48 +02:00
dependabot[bot] c60f5ab888
GH Actions: Bump the action-runners group with 2 updates
Bumps the action-runners group with 2 updates: [ossf/scorecard-action](https://github.com/ossf/scorecard-action) and [github/codeql-action](https://github.com/github/codeql-action).


Updates `ossf/scorecard-action` from 2.4.2 to 2.4.3
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](05b42c6244...4eaacf0543)

Updates `github/codeql-action` from 3.30.5 to 3.30.6
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](3599b3baa1...64d10c1313)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-06 06:02:48 +00:00
Mariusz Krzaczkowski e8f4d86c66
Update PHPMailer.php 2025-10-02 11:18:08 +02:00
Mariusz Krzaczkowski dc2ecee788
Update PHPMailerTest.php 2025-10-02 10:31:27 +02:00
Mariusz Krzaczkowski 07755f0f69
Update PHPMailerTest.php 2025-10-02 10:30:50 +02:00
Mariusz Krzaczkowski 512e26bffc
Update PHPMailerTest.php 2025-10-02 10:27:01 +02:00
Mariusz Krzaczkowski b135f4f284
Update PHPMailer.php 2025-10-02 10:19:16 +02:00
Marcus Bointon 5acdb20adf
Merge pull request #3241 from SirLouen/patch/3201v3
Improving docs and translations for deprecated useimap
2025-09-30 17:28:50 +02:00
SirLouen a26214d5a3
Fixing spanish translations 2025-09-30 17:25:47 +02:00
SirLouen 0b6ed12ed3
Adding new Translation format proposed by @Synchro 2025-09-30 17:24:11 +02:00
SirLouen 817d1e604e
Forgot one 2025-09-30 14:52:07 +02:00
SirLouen 94f8565fd0
Improving docs and translations for deprecated useimap 2025-09-30 14:48:13 +02:00
Marcus Bointon d9e3b36b47
6.11.1 2025-09-30 13:54:53 +02:00
Marcus Bointon fe380a85e0
Merge pull request #3240 from SirLouen/patch/3201v2
Regressing deprecatedArg
2025-09-30 13:51:19 +02:00
SirLouen 29f48d454e
Regressing deprecatedArg 2025-09-30 13:21:53 +02:00
Marcus Bointon 6ed58a9c60
Merge pull request #3238 from PHPMailer/dependabot/github_actions/action-runners-206d0ace73
GH Actions: Bump github/codeql-action from 3.30.3 to 3.30.5 in the action-runners group
2025-09-29 19:56:59 +02:00
Marcus Bointon 9500c37b70
Version and changelog 2025-09-29 18:40:59 +02:00
Marcus Bointon 39a1bc905c
Merge pull request #3237 from SirLouen/patch/3234
Reply-To to Indexed Array Conversion
2025-09-29 18:28:02 +02:00
Marcus Bointon 22a8dce04e
Merge pull request #3202 from SirLouen/patch/3201
Adding Name Encoding Improvement without MbString Extension
2025-09-29 18:26:33 +02:00
dependabot[bot] 9b899a0f22
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 3.30.3 to 3.30.5
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](192325c861...3599b3baa1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-29 07:07:40 +00:00
SirLouen 8e8b503db9
Doing some cleaning up 2025-09-26 22:16:18 +02:00
SirLouen bcc4d84893
Reply-To to Indexed Array Conversion 2025-09-26 22:05:05 +02:00
SirLouen b0f96abda0
Next version will be 6.11.0 for this deprecatedArg 2025-09-26 17:17:09 +02:00
SirLouen 0d5d8854f9
Fixing 8.3+ mb_decode_mimeheader changes 2025-09-26 17:13:11 +02:00
SirLouen 1191a4ef0b
Better use expectException 2025-09-26 02:36:03 +02:00
SirLouen 5060f5405c
Switching to expectError 2025-09-26 02:00:15 +02:00
SirLouen cae960ed2b
Remove xdebug function 2025-09-26 01:51:06 +02:00
SirLouen b1860a4e86
Better using static 2025-09-26 01:22:41 +02:00
SirLouen f4d321633d
Taking advantage of the new static translator 2025-09-26 01:16:38 +02:00
SirLouen 238af6720e
Remove iconv suggestion 2025-09-26 01:09:21 +02:00
SirLouen 95ff455f9d
Adding #3235 and reorganizing tests 2025-09-26 01:07:01 +02:00
SirLouen bda1fee442
Merge branch 'master' into patch/3201 2025-09-25 14:20:23 +02:00
Marcus Bointon ec08e9497d
Merge pull request #3200 from SirLouen/patch/3199
Improving Copy for mbstring intl test requirements
2025-09-24 18:49:05 +01:00
Marcus Bointon a49806c893
Merge branch 'master' into patch/3199 2025-09-24 18:35:25 +01:00
Marcus Bointon 759c73ef98
Merge pull request #3232 from jrfnl/feature/ghactions-set-minimal-permissions
GH Actions: set permissions for each workflow/job
2025-09-21 15:49:43 +01:00
jrfnl c8fdd4178e
GH Actions: set permissions for each workflow/job
> Users frequently over-scope their workflow and job permissions, or set broad workflow-level permissions without realizing that all jobs inherit those permissions.
>
> Furthermore, users often don't realize that the _default_ `GITHUB_TOKEN` permissions can be very broad, meaning that workflows that don't configure any permissions at all can _still_ provide excessive credentials to their individual jobs.
>
> **Remediation**
> In general, permissions should be declared as minimally as possible, and as close to their usage site as possible.
>
> In practice, this means that workflows should almost always set `permissions: {}` at the workflow level to disable all permissions by default, and then set specific job-level permissions as needed.

This was already addressed for the other two workflows, just not for the `tests` one.

As far as I can see, the jobs here do not need the `GITHUB_TOKEN` secret and even if they do, only for `content: read`, which for public repos does not need to be set explicitly, though it doesn't do any harm to have that set anyway.

Refs:
* https://docs.zizmor.sh/audits/#excessive-permissions
2025-09-21 16:39:02 +02:00
Marcus Bointon 041c556075
Merge pull request #3231 from jrfnl/feature/ghactions-do-not-persist-credentials
GH Actions: do not persist credentials
2025-09-21 15:08:42 +01:00
Marcus Bointon 7f75a4220a
Merge pull request #3113 from PHPMailer/dependabot/github_actions/codecov/codecov-action-5
GH Actions: Bump codecov/codecov-action from 4 to 5
2025-09-21 15:08:17 +01:00
dependabot[bot] eef3fef3ae
GH Actions: Bump codecov/codecov-action from 4 to 5
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4 to 5.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-21 13:59:33 +00:00
Marcus Bointon d418826b0d
Merge branch 'master' into feature/ghactions-do-not-persist-credentials 2025-09-21 14:57:23 +01:00
Marcus Bointon 7e878a18f1
Merge pull request #3230 from PHPMailer/dependabot/github_actions/actions/checkout-5.0.0
GH Actions: Bump actions/checkout from 4.3.0 to 5.0.0
2025-09-21 14:54:18 +01:00
jrfnl a209299105
GH Actions: do not persist credentials
> By default, using `actions/checkout` causes a credential to be persisted in the checked-out repo's `.git/config`, so that subsequent `git` operations can be authenticated.
>
> Subsequent steps may accidentally publicly persist `.git/config`, e.g. by including it in a publicly accessible artifact via `actions/upload-artifact`.
>
> However, even without this, persisting the credential in the `.git/config` is non-ideal unless actually needed.
>
> **Remediation**
>
> Unless needed for `git` operations, `actions/checkout` should be used with `persist-credentials: false`.
>
> If the persisted credential is needed, it should be made explicit with `persist-credentials: true`.

This has now been addressed in all workflows.

Refs:
* https://unit42.paloaltonetworks.com/github-repo-artifacts-leak-tokens/
* https://docs.zizmor.sh/audits/#artipacked
2025-09-21 15:01:18 +02:00
dependabot[bot] 0d6eaeb3a9
GH Actions: Bump actions/checkout from 4.3.0 to 5.0.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.3.0 to 5.0.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](08eba0b27e...08c6903cd8)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-21 10:20:29 +00:00
Marcus Bointon 80cd2d5f3a
Merge pull request #3228 from jrfnl/feature/ghactions-update-permissions-scorecard
GH Actions/scorecard: update permissions
2025-09-21 11:20:24 +01:00
Marcus Bointon 1714708220
Merge pull request #3229 from jrfnl/feature/ghactions-pin-action-runners
GH Actions: "pin" all action runners
2025-09-21 11:19:30 +01:00
jrfnl 5ce9b04aae
Dependabot: update config
This commit makes the following change to the Dependabot config:
* It introduces a "group".
    By default Dependabot raises individual PRs for each update. Now, it will group updates to new minor or patch release for all action runners into a single PR.
    Updates to new major releases of action runners will still be raised as individual PRs.

Refs:
* https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/optimizing-pr-creation-version-updates
* https://docs.github.com/en/code-security/dependabot/working-with-dependabot/dependabot-options-reference
2025-09-20 05:10:40 +02:00
jrfnl 086dfbe727
GH Actions: "pin" all action runners
Recently there has been more and more focus on securing GH Actions workflows - in part due to some incidents.

The problem with "unpinned" action runners is as follows:
* Tags are mutable, which means that a tag could point to a safe commit today, but to a malicious commit tomorrow.
    Note that GitHub is currently beta-testing a new "immutable releases" feature (= tags and release artifacts can not be changed anymore once the release is published), but whether that has much effect depends on the ecosystem of the packages using the feature.
    Aside from that, it will likely take years before all projects adopt _immutable releases_.
* Action runners often don't even point to a tag, but to a branch, making the used action runner a moving target.
    _Note: this type of "floating major" for action runners used to be promoted as good practice when the ecosystem was "young". Insights have since changed._

While it is convenient to use "floating majors" of action runners, as this means you only need to update the workflows on a new major release of the action runner, the price is higher risk of malicious code being executed in workflows.

Dependabot, by now, can automatically submit PRs to update pinned action runners too, as long as the commit-hash pinned runner is followed by a comment listing the released version the commit is pointing to.

So, what with Dependabot being capable of updating workflows with pinned action runners, I believe it is time to update the workflows to the _current_ best practice of using commit-hash pinned action runners.

The downside of this change is that there will be more frequent Dependabot PRs.

If this would become a burden/irritating, the following mitigations can be implemented:
1. Updating the Dependabot config to group updates instead of sending individual PRs per action runner.
2. A workflow to automatically merge Dependabot PRs as long as CI passes.

Includes updating the version for `ossf/scorecard-action` as it was a couple of version behind.

Ref: https://docs.github.com/en/actions/reference/security/secure-use#using-third-party-actions
2025-09-20 05:10:21 +02:00
jrfnl 63540d8cf3
GH Actions/scorecard: update permissions
... to match the current recommendations.

I've removed the "read" permissions as those should only be needed for "private" repos.

Ref: https://github.com/ossf/scorecard-action#additional-permissions-for-private-repositories
2025-09-20 05:09:45 +02:00
Marcus Bointon 6f0f7a7f68
Extract gmail transaction IDs, fixes #3224 2025-09-18 17:27:24 +02:00
Marcus Bointon 9f0387fb37
Changelog 2025-09-18 17:27:24 +02:00
Manuel Camargo 6cab1544fa
Merge branch 'master' into patch/3201 2025-09-12 13:41:55 +02:00
Marcus Bointon 5bc453d6c5
Merge pull request #3226 from schorschii/smime-longline-encoding-header-fix
Fix encoding header for SMIME signed messages with long lines
2025-09-11 22:23:42 +01:00
Marcus Bointon 4c917a9b46
CS 2025-09-11 23:16:50 +02:00
Georg Sieber 5470c1e795
add test 2025-09-11 22:52:01 +02:00
Georg Sieber fd9f8d33cb
fix encoding header for SMIME signed messages with long lines 2025-09-11 19:03:20 +02:00
Manuel Camargo 6a6e66abf4
Merge branch 'master' into patch/3201 2025-09-11 14:42:41 +02:00
SirLouen b1b1f65f0b
Merge branch 'master' into patch/3201 2025-09-11 14:32:06 +02:00
SirLouen 7e61c84718
Add an extra test 2025-09-09 17:18:43 +02:00
Marcus Bointon 5ddea0610b
Merge pull request #3217 from SirLouen/patch/3210
Modularizing and Simplifying the Address Parser
2025-09-02 21:11:31 +02:00
SirLouen 3c93e8d6f3
Adding Temporary Specific Tests for Native Function 2025-08-24 16:03:51 +02:00
SirLouen e72170c6ba
Little separator line 2025-08-24 15:38:03 +02:00
SirLouen 69a2b8038f
Removing Tests. Reintroducing them fixed in #3197 2025-08-24 15:37:42 +02:00
SirLouen 0ce6905391
Merge branch 'master' into patch/3210 2025-08-24 15:29:04 +02:00
Marcus Bointon a848a67c50
Merge pull request #3216 from SirLouen/patch/3215
Staticfying the Language Pack
2025-08-24 15:08:15 +02:00
SirLouen 22885eaf4a
Preparing new version for no-IMAP, Tests Pending 2025-08-23 16:40:10 +02:00
SirLouen b41dd255a2
Staticfying the Language Pack 2025-08-23 16:16:14 +02:00
Marcus Bointon 85f7f98f59
Merge branch 'master' into patch/3201
# Conflicts:
#	src/PHPMailer.php
2025-08-22 17:25:24 +02:00
SirLouen f2af1cafb5
Merge from master 2025-08-22 17:20:23 +02:00
SirLouen 34c6423ac6
Sorting the Array problem in doCallback 2025-08-22 17:19:27 +02:00
Marcus Bointon 81eedda461
Alphabetical 2025-08-22 16:49:10 +02:00
Marcus Bointon d43654d445
Merge pull request #3208 from SirLouen/patch/3207
Sorting the Array problem in doCallback
2025-08-22 15:15:04 +02:00
Marcus Bointon 19f17f8aeb
CS 2025-08-22 15:12:14 +02:00
Marcus Bointon fef2d5cf15
Merge branch 'master' into patch/3201 2025-08-22 10:46:57 +02:00
Marcus Bointon f78d341f06
Merge pull request #3191 from jrfnl/feature/fix-test-runtime-deprecations-php-8.5
PHP 8.5 | Tests: prevent deprecation notice for Reflection*::setAccessible()
2025-08-22 10:45:27 +02:00
Marcus Bointon 276eb1e879
Merge pull request #3211 from jrfnl/feature/fix-lint-issue-php-8.5
Fix linting issue on PHP 8.5
2025-08-22 10:44:33 +02:00
jrfnl 855bf067fc
Fix linting issue on PHP 8.5
As per the options described in https://github.com/PHPMailer/PHPMailer/pull/3202#issuecomment-3212478928.

Note: the linting ignore comment triggers some PHPCS errors (_sigh_), so I'm selectively excluding those.
Alternatively, it could be considered to exclude test fixture files completely from the PHPCS scan.
2025-08-22 02:27:01 +02:00
Marcus Bointon da0cffbc05
CS 2025-08-21 10:23:38 +02:00
SirLouen 71dfc112c9
Better this deprecation method 2025-08-19 16:04:16 +02:00
SirLouen f1255a0a55
Deprecation & Composer Updates 2025-08-19 16:00:45 +02:00
SirLouen 97f4e58e18 Sorting the Array problem in doCallback 2025-08-17 13:18:53 +02:00
SirLouen f7b82634c9 Return useimap for BC 2025-08-17 12:28:52 +02:00
SirLouen 99b482752e Final Act including iconv_mime_decode 2025-08-17 00:01:46 +02:00
SirLouen d2fc22a4f1 Fixing #3204 2025-08-16 18:28:42 +02:00
SirLouen a3ddc21741 Adding Tests 2025-08-16 00:05:45 +02:00
SirLouen bf8e97d3c8 Adding Name Encoding Improvement without MbString Extension 2025-08-14 02:19:38 +02:00
Marcus Bointon 800919c6a4
Merge pull request #3193 from christianseel/patch-1
Enhance 'interrupted system call' check to handle non-english locale
2025-08-13 00:38:01 +02:00
SirLouen 2f92d9c841 Improving Copy for mbstring intl test requirements 2025-08-12 23:50:19 +02:00
Christian Seel 5b970527ae
Enhance interrupted system call check for non-english locale
on applications with a different locale than english, the message "interrupted system call" is not found because it's translated. So we also check for the SOCKET_EINTR constant which is defined under Windows and UNIX-like platforms (if available on the platform).
2025-08-11 14:09:44 +02:00
Marcus Bointon ca34869b2c
Merge pull request #3190 from jrfnl/feature/ghactions-show-startup-errors
GH Actions: update PHP ini configuration
2025-08-10 10:14:27 +02:00
jrfnl 096b24646e
PHP 8.5 | Tests: prevent deprecation notice for Reflection*::setAccessible()
Since PHP 8.1, calling the `Reflection*::setAccessible()` methods is no longer necessary as reflected properties/methods/etc will always be accessible.
However, the method calls are still needed for PHP < 8.1.

As of PHP 8.5, calling the `Reflection*::setAccessible()` methods is now formally deprecated and will yield a deprecation notice, which will fail test runs.
As of PHP 9.0, the `setAccessible()` method(s) will be removed.

With the latter in mind, this commit prevents the deprecation notice by making the calls to `setAccessible()` conditional.

Silencing the deprecation would mean, this would need to be "fixed" again come PHP 9.0, while the current solution should be stable, including for PHP 9.0.

Ref: https://wiki.php.net/rfc/deprecations_php_8_5#extreflection_deprecations
2025-08-10 05:38:47 +02:00
jrfnl 91ef7d0e54
GH Actions: update PHP ini configuration
Add `display_startup_errors=On` as per the current recommendation from PHPUnit.

Ref: b3b159cbe9
2025-08-10 05:32:47 +02:00
Marcus Bointon f202f351ca
Don't use `-t` switch with qmail, see #3189 2025-08-08 11:58:13 +02:00
Marcus Bointon 52d0fe4916
Merge pull request #3187 from jrfnl/feature/ghactions-dont-run-cronjobs-on-forks
GH Actions: don't run cron jobs on forks
2025-08-04 18:26:34 +02:00
jrfnl fc8c76f3be
GH Actions: don't run cron jobs on forks
While workflows are disabled by default in forks, it is quite common for contributors to enable them to verify CI will pass before submitting a pull request.

When enabling workflow runs in forks, it's "all or nothing".
This means that:
* All workflows which are only intended to be run on the canonical repo will also be enabled.
    These workflows will also often need access to repo-specific secrets and will typically fail when run from a fork.
* Workflows which contain cron jobs will also be enabled.
    Depending on the type of account the contributor has, this can burn through their "CI minutes".

This commit is based on a review of workflows containing cron jobs and disables running the jobs when a cron job is triggered in a fork.
2025-08-04 18:10:23 +02:00
Marcus Bointon 0ff2d3c8ea
Changelog 2025-06-18 23:02:11 +02:00
Marcus Bointon a2fa102104
Merge pull request #3170 from llemoine/master
XOAUTH : Added support for long auth tokens
2025-06-18 22:52:38 +02:00
Marcus Bointon ffbe1ad27f
CS 2025-06-18 20:32:55 +02:00
Marcus Bointon ce9d1b6883
Add support for empty tokens 2025-06-18 19:37:59 +02:00
Marcus Bointon 90cdf758c2
Clean up 2025-06-18 19:37:28 +02:00
LE MOINE Laurent 5fc635571b Fixed typo and added strict comparison on response code 2025-06-18 16:19:12 +02:00
LE MOINE Laurent 8ca031797f Added support for maximum command size during XOAUTH2 authentication 2025-06-18 11:01:34 +02:00
Marcus Bointon 912f278a48
Add workaround for #3163 2025-05-31 10:46:53 +02:00
Marcus Bointon 2efdf63a32
Add formatting script 2025-05-31 10:41:07 +02:00
Marcus Bointon bf74d75a1f
6.10.0 2025-04-24 17:19:31 +02:00
Marcus Bointon e932843879
Docs 2025-04-24 17:15:26 +02:00
Marcus Bointon ca87ef20d2
Docs 2025-04-24 15:26:45 +02:00
Marcus Bointon 80b6275ebc
Skip this test when UTF-8 isn't usable 2025-04-23 21:42:01 +02:00
Marcus Bointon c5dae41b32
Merge branch 'SMTPUTF8-test' into SMTPUTF8 2025-04-10 16:11:46 +02:00
Marcus Bointon fc6779f050
Fail to add an address if it uses 8-bit chars in the domain, but we are missing extensions to support IDN. 2025-04-10 16:10:46 +02:00
Marcus Bointon 154743c305
nah 2025-04-09 22:51:34 +02:00
Marcus Bointon 1ef59a2a99
Try without mbstring 2025-04-09 22:32:36 +02:00
Marcus Bointon 1db5c74f76
Use existing function to check for test config 2025-04-09 14:35:24 +02:00
Arnt Gulbrandsen d31cb27117
Adjust eai regex to disallow emoji and letters/numbers.
Update a few tests to match the recent changes.

Use the eai validator (unless another is being used) for addresses such as
info@müller-schmidt.de, for which PHPMailer may not choose to use SMTPUTF8.
2025-04-09 14:13:35 +02:00
Marcus Bointon b62de86fd2
Explain eai 2025-04-09 14:13:33 +02:00
Marcus Bointon eda0313e07
Explain eai 2025-04-09 14:13:30 +02:00
Marcus Bointon 17b3dfbdb9
Explain eai 2025-04-09 14:13:26 +02:00
Marcus Bointon 6467d54259
Explain why 2025-04-09 14:13:23 +02:00
Marcus Bointon 2818f3e6a3
Use falsy check as it could be null or false 2025-04-09 14:13:18 +02:00
Marcus Bointon ddebeb0565
Default CharSet to UTF-8 if we are using UTF-8 addresses and the validator has not been changed. 2025-04-09 14:13:13 +02:00
Marcus Bointon 29a04c283a
Consistent quotes 2025-04-09 14:13:09 +02:00
Marcus Bointon 956a31928c
Cleanup 2025-04-09 14:13:06 +02:00
Marcus Bointon 6d7233935f
Comment 2025-04-09 14:13:03 +02:00
Marcus Bointon 8b0667099d
CS 2025-04-09 14:13:00 +02:00
Arnt Gulbrandsen e588719eec
Send unencoded UTF8 in subject/body text when SMTPUTF8 allows that. 2025-04-09 14:12:59 +02:00
Arnt Gulbrandsen 2f0af94d33
Set UseSMTPUTF8 fully automatically when needed
This makes SMTPUTF8 support the default when the user chooses to use UTF-8
as charset, without affecting code that uses ISO 8859-1.
2025-04-09 14:12:59 +02:00
Marcus Bointon 0e7b094a32
Throw an exception if the server doesn't support SMTPUTF8 and we need it 2025-04-09 14:12:58 +02:00
Marcus Bointon c6d62ac4af
Comment 2025-04-09 14:12:55 +02:00
Marcus Bointon 7cda202270
Check explicit validation 2025-04-09 14:12:51 +02:00
Marcus Bointon bfd4c3db1a
Choose a validator that should fail 2025-04-09 14:12:45 +02:00
Marcus Bointon 321aeb200d
Typo 2025-04-09 14:12:42 +02:00
Marcus Bointon 7fb51f0c50
Changelog 2025-04-09 14:12:39 +02:00
Marcus Bointon c1c3b24e9c
Unicode is a proper name 2025-04-09 14:12:35 +02:00
Marcus Bointon 37e54ed3ed
CS 2025-04-09 14:12:08 +02:00
Arnt Gulbrandsen 9278e5774a
Add support for RFC6530, using it only when required.
This adds the ability to send email to addresses like grå@grå.org, but
preserves phpmailer's old behaviour for all addresses that worked before
(such as info@grå.org).
2025-04-09 10:59:48 +02:00
Marcus Bointon e7b1334cf2
Update Readme 2025-04-01 10:08:58 +02:00
Marcus Bointon ca476d4d55
Merge pull request #3147 from sudojoao/master
Add missing translations and improve grammar for professionalism European Portuguese 🇵🇹
2025-03-25 15:31:16 +01:00
Marcus Bointon cd219181e9
Update test strings after #3148 2025-03-23 21:39:24 +01:00
Marcus Bointon 71d87be28f
Merge pull request #3148 from sudwebdesign/patch-1 2025-03-23 12:35:42 -04:00
Thomas Ingles 57347817b4
Fix the smtp error `ErrorInfo` msg: Troubleshooting url glued
`SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/TroubleshootingSMTP server error: Failed to connect to server SMTP code: 111 Additional SMTP info: Connection refused`

Become

`SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting SMTP server error: Failed to connect to server SMTP code: 111 Additional SMTP info: Connection refused`
2025-03-23 16:52:48 +01:00
João Vieira 101bb806dd
Add missing translations and improve grammar for professionalism 2025-03-21 16:03:40 +00:00
João Vieira 7d81c4b189
Add missing translations and improve grammar for professionalism 2025-03-21 15:53:53 +00:00
Marcus Bointon ab8d4f87a4
Use the `email` field to check for form submission, see #3144 2025-03-04 19:11:22 +01:00
Marcus Bointon ac30223de5
Merge pull request #3133 from no-one/master
Remove a space
2025-02-05 21:13:57 +01:00
CeeKay 22392c8fed
Remove a space 2025-02-05 19:59:08 +01:00
Marcus Bointon 0408a4926a
Merge pull request #3132 from no-one/master
Replace Swiftmailer with Symfony Mailer
2025-02-05 14:59:38 +01:00
CeeKay 0de87f8fda
Replace Swiftmailer with Symfony Mailer
https://symfony.com/blog/the-end-of-swiftmailer
2025-02-05 13:28:59 +01:00
Marcus Bointon ccce6f6ce9
Merge pull request #3130 from ziegenberg/dont-export-editorconfig
Do not add `.editorconfig` file to releases
2025-02-02 21:34:18 +01:00
Daniel Ziegenberg 35b6ca5085
Do not add .editorconfig file to releases
Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2025-02-02 19:56:13 +01:00
Marcus Bointon 2f5c94fe74
6.9.3 2024-11-24 19:04:13 +01:00
Marcus Bointon 2c73ad9dd5
Changelog 2024-11-22 06:36:49 +01:00
Marcus Bointon 7e2e8d53e6
Merge pull request #3115 from jrfnl/feature/ghactions-update-for-php-8.4-release
GH Actions: PHP 8.4 has been released
2024-11-22 05:02:58 +01:00
jrfnl 7c786ca890
GH Actions: PHP 8.4 has been released
* Builds against PHP 8.4 are no longer allowed to fail.
* Add _allowed to fail_ builds against PHP 8.5.

Ref: https://www.php.net/releases/8.4/en.php
2024-11-22 01:58:32 +01:00
Marcus Bointon 561609ac2e
Merge pull request #3114 from emmanuel-ferdman/master
Update `PHPMailerTest.php` reference
2024-11-18 16:50:36 +01:00
Emmanuel Ferdman 5c95844f50
Update `PHPMailerTest.php` reference
Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
2024-11-18 07:29:21 -08:00
Marcus Bointon 611235697c
CS 2024-10-21 11:42:14 +02:00
Marcus Bointon 5fc8d634b5
Clarify comment 2024-10-21 11:36:38 +02:00
Marcus Bointon 182f7b9158
Use rfc-editor.org for all docs links 2024-10-15 22:20:47 +02:00
Marcus Bointon a7b17b42fa
6.9.2 2024-10-09 12:07:50 +02:00
Marcus Bointon f658da94f1
Changelog 2024-10-02 23:35:19 +02:00
Marcus Bointon 4617ffee59
Changelog 2024-10-02 23:32:15 +02:00
Marcus Bointon df46489479
Add Kurdish Sorani translation 2024-10-02 23:26:04 +02:00
Marcus Bointon d234e50f25
Simpler regex 2024-10-02 23:17:14 +02:00
Marcus Bointon c1c075a69e
This will never match, so look for a string instead 2024-10-02 23:17:13 +02:00
Marcus Bointon f851553d26
Merge pull request #3020 from Yurunsoft/fix-set_error_handler
Fix cannot access protected method
2024-10-02 23:12:07 +02:00
Marcus Bointon 7a67257f84
Merge pull request #3003 from jeijei4/patch-1
Update of PHPDoc comment of the addOrEnqueueAnAddress function
2024-10-02 22:45:21 +02:00
Marcus Bointon 9d05d769dd
Merge pull request #3096 from jrfnl/feature/ghactions-extension-variation-in-tests
GH Actions: test with different sets of extensions
2024-10-02 08:41:43 +02:00
jrfnl 6b2e692d45
GH Actions: test with different sets of extensions
PHP 8.4 removes the IMAP extension (moved to PECL).

With this in mind, I've reviewed how the tests are being run versus the extension requirements and recommendations.

As things are, the tests are currently run in the "ideal" environment, i.e. with all required and optional extensions available.

However, the codebase also contains fall-backs for when certain extensions are **_not_** available and for at least some of those fallbacks, there are dedicated tests available, but in an ideal environment those tests will not run and the fall-backs are not tested, which is the case with the current CI setup.

To improve this situation, I'm proposing to keep running the tests against all PHP versions with the "ideal" extension set, but to also have additional test runs with a far more limited set of PHP extensions.

To determine which extensions should be in each set, I've looked at the following:
* `@requires` tags found in the test suite and the conditions for calls to `markTestSkipped()`.
    This brought to light that the `openssl` extension was currently not listed in the "ideal" extension set. This has now been fixed.
* The required extensions of PHPUnit - `dom, json, libxml, mbstring, tokenizer, xml, xmlwriter`.
* The required extensions of PHPMailer itself - `ctype, filter, hash`.
* Not strictly required, but more for convenience/workflow speed: `curl` for Composer.
* And `xdebug` will still be enabled/disabled based on the `coverage` setting.

Note: while some tests would benefit from being run _without_ the `mbstring` extension, that's unfortunately not an option as `mbstring` is a requirement of PHPUnit 🤷

Also note, the tests with the "minimal" extension setup needs to run `composer install` with an `--ignore-platform-req` flag to prevent running into the following issue:
```
Running update with --no-dev does not mean require-dev is ignored, it just means the packages will not be installed. If dev requirements are blocking the update you have to resolve those problems.
```

As this extension "requirement" is for a dependency which is not used in the test run, the extension requirement can be safely ignored.
2024-09-18 17:34:12 +02:00
Marcus Bointon 81599d1554
Merge pull request #3094 from jrfnl/feature/testGivenIdnAddress-set-requirements
PHPMailerTest::testGivenIdnAddress...(): set test requirements
2024-09-18 16:27:31 +02:00
jrfnl 6028776a63
PHPMailerTest::testGivenIdnAddress...(): set test requirements
As per the discussion in 3092, this commit removes the `fakefunctions.php` file and adds explicit requirements for the `PHPMailerTest::testGivenIdnAddress_addAddress_returns_true()` test method.

Closes 3092
2024-09-12 09:11:34 +02:00
Marcus Bointon b554b1e6ca
Merge pull request #3091 from jrfnl/feature/tests-fix-dkim-test
DKIMTest: two fixes for tests for when OpenSSL is disabled/unavailable
2024-09-12 08:43:06 +02:00
jrfnl 78146fb172
DKIMTest::testDKIMSignOpenSSLNotAvailable(): fix the test
As things were, the `DKIMTest::testDKIMSignOpenSSLNotAvailable()` could not pass as the `DKIMTest` class sets the `USE_EXCEPTIONS` class constant to `true`, which means the method would fail on an exception.

As this test is specifically about testing the behaviour when exceptions are _disabled_, the test needs to be in its own test class, which sets `USE_EXCEPTIONS` to `false`.

That should allow the test to run properly and to pass.
2024-09-11 21:05:02 +02:00
jrfnl 10f76cd790
DKIMTest: make exception expectation more specific
As things were, the `DKIMTest::testDKIMSignOpenSSLNotAvailableException()` test _could_ potentially pass even when another `Exception` than the `PHPMailer\PHPMailer\Exception` was being thrown, as _all_ exceptions extend the PHP native `Exception` class.
Now this risk is not that high, as there is also a check on the exception message, but still.

Making the exception expectation more specific (by changing the import `use` statement), should still make the test more stable.
2024-09-11 21:05:02 +02:00
Marcus Bointon aaddfdf6ec
Merge pull request #3090 from jrfnl/feature/composer-no-lock
Composer: prevent a lock file from being created
2024-09-11 19:07:10 +02:00
jrfnl 3a8e00e4dc
Composer: prevent a lock file from being created
Composer 1.10.0 introduced a `lock` config option, which, when set to `false` will prevent a `composer.lock` file from being created and will ignore it when one exists.

This is a useful option for packages like PHPMailer where the `lock` file has no meaning.

It also makes life more straight-forward for contributors as they don't have to remember that for this repo they should use `composer update` instead of `composer install`. Both will now work the same.

Refs:
https://getcomposer.org/doc/06-config.md#lock
2024-09-11 18:20:45 +02:00
Marcus Bointon 6acfa78df6
Merge pull request #3083 from murongshaozong/master
chore: fix some comments
2024-08-13 10:38:49 +02:00
murongshaozong 19989e4165 chore: fix some comments
Signed-off-by: murongshaozong <netease163@icloud.com>
2024-08-13 15:07:00 +08:00
Marcus Bointon 3d01e8e5ea
Merge pull request #3079 from PHPMailer/dependabot/github_actions/ossf/scorecard-action-2.4.0
GH Actions: Bump ossf/scorecard-action from 2.3.1 to 2.4.0
2024-07-29 15:41:38 +02:00
dependabot[bot] a93c0f2eb1
GH Actions: Bump ossf/scorecard-action from 2.3.1 to 2.4.0
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.3.1 to 2.4.0.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](0864cf1902...62b2cac7ed)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-29 06:02:58 +00:00
Marcus Bointon 4a171fd017
Update changelog.md 2024-07-20 16:03:33 +02:00
Marcus Bointon e6d79a4853
Merge pull request #3074 from ProjectSoft-STUDIONIONS/patch-1
Full translation into Russian
2024-07-20 16:02:33 +02:00
ProjectSoft cad92ca7bd
Full translation into Russian 2024-07-20 16:48:39 +04:00
Marcus Bointon 47f3dbbec1
Merge pull request #3071 from decomplexity/patch-3
Additional operands for GoogleAPI for .json management
2024-07-04 19:06:38 +02:00
decomplexity e79d9f251b
Additional operands for GoogleAPI for .json management
V4.1.0 of the SendOauth2 wrapper introduces two new optional operands for the invocation of both the standard PHPMailer email application and for the complete replacement of a PHPMailer application by the wrapper SendOauth2A front-end. These operands allow the developer to specify a name for the .json credentials file and/or whether the wrapper should dynamically build this .json file or use an already-built one, created  either by Google (its standard download) or by the developer.
2024-07-04 17:18:57 +01:00
decomplexity 10f8e5a7a9
Additional operands for GoogleAPI for .json management
V4.1.0 of the SendOauth2 wrapper introduces two new optional operands for the invocation of both the standard PHPMailer email application and for the complete replacement of a PHPMailer application by the wrapper SendOauth2A front-end. These operands allow the developer to specify a name for the .json credentials file and/or whether the wrapper should dynamically build this .json file or use an already-built one, created  either by Google (its standard download) or by the developer.
2024-07-04 16:36:48 +01:00
Marcus Bointon 06e6e80713
Update UPGRADING.md 2024-05-16 10:22:19 +02:00
Marcus Bointon 829def3388
Update for Codecov token handling change 2024-04-09 11:06:30 +02:00
Marcus Bointon 7bbeaff562
Merge pull request #3013 from PHPMailer/dependabot/github_actions/codecov/codecov-action-4
GH Actions: Bump codecov/codecov-action from 3 to 4
2024-04-09 11:02:24 +02:00
Marcus Bointon e8135be763
Try to persuade postfix to install 2024-04-08 20:25:15 +02:00
Marcus Bointon bd0ac03cb2
Changelog 2024-04-08 20:11:42 +02:00
Marcus Bointon 4551149ba2
IDE help 2024-04-08 20:11:42 +02:00
Marcus Bointon fb317f2a36
Clean up 2024-04-08 20:11:41 +02:00
Marcus Bointon 41027807eb
Merge pull request #3027 from saqibsra/master
Add urdu language support
2024-04-08 20:02:15 +02:00
Marcus Bointon 3c7ed1e7c8
Merge pull request #3006 from arakim/master
Update phpmailer.lang-ja.php
2024-04-08 20:01:33 +02:00
Marcus Bointon 62ed471071
Update phpmailer.lang-ja.php
Remove breaks - this is not really PHP!
2024-04-08 20:00:47 +02:00
Marcus Bointon 400aeae82c
Merge pull request #3047 from axi/#3045
Remove potential ending line break when using edebug() with LoggerInterface
2024-04-08 19:11:49 +02:00
Alexis Urien 72df7924ae Remove potential ending line break when using edebug() with LoggerInterface 2024-04-08 10:06:16 -07:00
Alexis Urien 01db3e6b24 Remove potential ending line break when using edebug() with LoggerInterface 2024-04-08 08:52:41 -07:00
Alexis Urien df33c89c5b Remove potential ending line break when using edebug() with LoggerInterface 2024-04-08 08:40:09 -07:00
Marcus Bointon 49b4cedfec
Changelog 2024-04-01 23:04:03 +02:00
Marcus Bointon 683d3730fc
Restore trailing space 2024-04-01 22:55:32 +02:00
Marcus Bointon 8f98ddf086
Restore trailing space 2024-04-01 22:41:15 +02:00
Marcus Bointon dfa731a087
Check broken links, update for HTTPS everywhere 2024-04-01 20:48:10 +02:00
Marcus Bointon f74f3681a5
Changelog 2024-03-30 08:34:56 +01:00
Marcus Bointon 767b1cfb1f
Merge pull request #3042 from danicruz0415/danicruz0415-patch-1
Adds missing translations
2024-03-30 08:34:07 +01:00
danicruz0415 f6478428c7
Adds missing translations 2024-03-29 23:12:59 -05:00
Marcus Bointon a0dcf5f788
Changelog 2024-03-26 18:45:33 +01:00
Marcus Bointon d92d4040b4
Merge pull request #3038 from sbri/master
Update phpmailer.lang-tr.php
2024-03-26 18:42:47 +01:00
Marcus Bointon 7564ef3f41
Update phpmailer.lang-tr.php
No tabs
2024-03-26 18:40:58 +01:00
Marcus Bointon 539a94a608
Update phpmailer.lang-tr.php
Despite appearances, translation files are not actually treated as PHP code
2024-03-26 18:34:58 +01:00
Marcus Bointon 0ae9628228
Merge pull request #3041
Cleaned up OAuth example
2024-03-26 18:29:01 +01:00
Marcus Bointon 5d698fc44d
Cleanup 2024-03-26 18:26:42 +01:00
decomplexity 749e9a3a9d
OAuth2 for MSFT and Google API with authorization_code or client_credentials
Client secrets and X.509 certificates, $_SESSION 'state' and PKCE code exchanges, and creation on the fly of GoogleAPI's .json credentials files are supported.
2024-03-23 20:29:21 +00:00
sbri f526634b30
Update phpmailer.lang-tr.php 2024-03-20 16:04:18 +03:00
Mariusz Krzaczkowski da0212d7d4
Add cid default domain 2024-03-19 12:16:12 +01:00
Mariusz Krzaczkowski 6ec886b292
Add cid default domain 2024-03-15 17:27:41 +01:00
Marcus Bointon 579202e36f
Merge pull request #3028 from PHPMailer/dependabot/github_actions/ramsey/composer-install-3
GH Actions: Bump ramsey/composer-install from 2 to 3
2024-03-12 23:07:08 +01:00
Marcus Bointon 49a8caa76a
Merge pull request #3014 from PHPMailer/dependabot/github_actions/nick-invision/retry-3
GH Actions: Bump nick-invision/retry from 2 to 3
2024-03-12 23:06:55 +01:00
dependabot[bot] e6ca69847a
GH Actions: Bump ramsey/composer-install from 2 to 3
Bumps [ramsey/composer-install](https://github.com/ramsey/composer-install) from 2 to 3.
- [Release notes](https://github.com/ramsey/composer-install/releases)
- [Commits](https://github.com/ramsey/composer-install/compare/v2...v3)

---
updated-dependencies:
- dependency-name: ramsey/composer-install
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-04 06:56:31 +00:00
saqibsra 77515b997c Add urdu language support 2024-03-02 17:24:28 +05:00
Yurun d6bfb496c1 Fix cannot access protected method 2024-02-19 09:57:30 +08:00
dependabot[bot] 52d55bf5ab
GH Actions: Bump nick-invision/retry from 2 to 3
Bumps [nick-invision/retry](https://github.com/nick-invision/retry) from 2 to 3.
- [Release notes](https://github.com/nick-invision/retry/releases)
- [Changelog](https://github.com/nick-fields/retry/blob/master/.releaserc.js)
- [Commits](https://github.com/nick-invision/retry/compare/v2...v3)

---
updated-dependencies:
- dependency-name: nick-invision/retry
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-05 06:39:47 +00:00
dependabot[bot] dc4f2e3418
GH Actions: Bump codecov/codecov-action from 3 to 4
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 4.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-05 06:39:41 +00:00
Marcus Bointon 5251d33124
Escape refresh token 2024-01-31 23:05:36 +01:00
Marcus Bointon 6939bf9828
Changelog 2024-01-25 10:36:39 +01:00
Marcus Bointon 760bb5fd27
Add link to aboutmy.email 2024-01-25 10:36:31 +01:00
ARAKI Musashi 26f72ad6c7
Update phpmailer.lang-ja.php
Added translation of untranslated parts.
2024-01-15 00:47:54 +09:00
Marcus Bointon 0f0b5a9560
Changelog 2024-01-09 19:35:32 +01:00
Marcus Bointon 2410f43d8c
Dots need escaping 2024-01-09 19:31:07 +01:00
JeiHO 0f9159e0bf
Update of PHPDoc comment of the addOrEnqueueAnAddress function
Update of PHPDoc comment of the addOrEnqueueAnAddress function
2024-01-05 10:26:39 -06:00
Marcus Bointon 5372c1694d
Merge pull request #2996 from PHPMailer/dependabot/github_actions/actions/upload-artifact-4
GH Actions: Bump actions/upload-artifact from 3 to 4
2023-12-18 08:46:07 +01:00
Marcus Bointon e81afe7cc1
Merge pull request #2995 from PHPMailer/dependabot/github_actions/github/codeql-action-3
GH Actions: Bump github/codeql-action from 2 to 3
2023-12-18 08:45:50 +01:00
dependabot[bot] 2b95ac8a56
GH Actions: Bump actions/upload-artifact from 3 to 4
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3...v4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-18 06:16:47 +00:00
dependabot[bot] 8c65fb5bae
GH Actions: Bump github/codeql-action from 2 to 3
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2 to 3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-18 06:16:42 +00:00
Marcus Bointon d69114c1eb
Merge pull request #2992 from Blue3957/master
Fixed incorrect past participle agreement in phpmailer.lang-fr.php
2023-12-06 20:15:38 +01:00
Arthur Boucher 6b48444598
Fixed incorrect past participle agreement in phpmailer.lang-fr.php 2023-12-06 14:46:24 +01:00
Marcus Bointon 039de174cd
6.9.1 2023-11-25 23:23:28 +01:00
Marcus Bointon 3190bef442
CS 2023-11-25 23:23:18 +01:00
Marcus Bointon d327514f47
Merge pull request #2985 from decomplexity/patch-1
Create sendoauth2.phps
2023-11-25 23:19:50 +01:00
Marcus Bointon 934f852bfa
PHPMailer 6.9.0 2023-11-25 23:16:39 +01:00
Marcus Bointon 1a7d9e3739
Suggest SendOauth2 package 2023-11-25 23:16:03 +01:00
Marcus Bointon bffe2907d2
Update readme for XOAUTH2 changes 2023-11-25 23:13:05 +01:00
Marcus Bointon e443047d03
Don't need this to demo xoauth 2023-11-25 23:04:59 +01:00
Marcus Bointon d5615bffb4
Merge pull request #2986 from frankforte/custom-headers
Improvements for `clearCustomHeader` and `replaceCustomerHeader`
2023-11-25 23:02:29 +01:00
Frank Forte 8a91dd64f4 Code formatting for custom header methods. 2023-11-25 13:48:53 -05:00
Frank Forte b0ffd67775 Update replaceCustomerHeader to remove duplicates. Improve clearCustomHeader and relaceCustomHeader to handle name: value. 2023-11-25 12:37:07 -05:00
decomplexity 5a52bddc48
Update sendoauth2.phps
Updated from @synchro's comments
2023-11-24 19:18:36 +00:00
decomplexity fd0e447995
Create sendoauth2.phps
OAuth2 authentication for both Microsoft 365 Exchange email and Google Gmail. Client secrets and X.509 certificates are supported for Exchange. Client secrets are supported for Gmail. Authorization_code grant flow and client_credentials grant flow for SMTP are supported for Exchange. Authorization_code grant flow is supported for Gmail.
2023-11-23 19:43:26 +00:00
Marcus Bointon 677ff5b2f9
CS 2023-11-23 12:12:10 +01:00
Marcus Bointon dd16b7d95b
Add use of replaceCustomHeader in mailing list example, see #2981 2023-11-23 11:59:21 +01:00
Marcus Bointon 718eebd676
Merge pull request #2799 from chapeupreto/add-editorconfig
Add .editorconfig file
2023-11-23 09:22:25 +01:00
Marcus Bointon 32f7a11a7b
Merge pull request #2951 from Manish4586/master
Add translations for bn and as
2023-11-23 09:21:28 +01:00
Marcus Bointon 66b6c7e97d
Merge pull request #2971 from PHPMailer/dependabot/github_actions/ossf/scorecard-action-2.3.1
GH Actions: Bump ossf/scorecard-action from 2.2.0 to 2.3.1
2023-11-23 09:15:16 +01:00
Marcus Bointon 7071666cf4
Merge pull request #2952 from PHPMailer/dependabot/github_actions/actions/checkout-4
GH Actions: Bump actions/checkout from 3 to 4
2023-11-23 09:14:44 +01:00
Marcus Bointon 3104b10d73
Merge pull request #2852 from mta59066/xclient
XCLIENT implementation
2023-11-23 09:12:59 +01:00
Marcus Bointon b4bda44618
Merge pull request #2983 from jrfnl/feature/ghactions-minor-tweaks
GH Actions: update a few links in inline comments
2023-11-23 09:10:14 +01:00
Marcus Bointon 355acdeb61
Merge pull request #2982 from jrfnl/feature/ghactions-php-8.3-update
GH Actions: update for release of PHP 8.3
2023-11-23 09:09:20 +01:00
jrfnl e503535644
GH Actions: update a few links in inline comments
... as the old URLs are no longer valid.
2023-11-23 04:15:40 +01:00
jrfnl 23f8374f89
GH Actions: update for release of PHP 8.3
... which is expected later today.
2023-11-23 04:14:54 +01:00
Marcus Bointon f2798a387d
Merge pull request #2981 from frankforte/custom-headers
Add methods to update or clear custom headers by name.
2023-11-22 18:25:52 +01:00
Frank Forte beb87e3cf7 validate value in replaceCustomHeader 2023-11-22 12:02:49 -05:00
Frank Forte 174653aa27 Add methods to update or clear custom headers by name. 2023-11-22 11:35:33 -05:00
Marcus Bointon 9952101e44
Wrong word 2023-11-17 10:59:11 +01:00
Marcus Bointon cbe9d8d9a9
CS 2023-11-08 19:16:12 +01:00
Marcus Bointon 666af00c0d
Changelog 2023-11-08 19:15:27 +01:00
Marcus Bointon 4da71db8ce
CS 2023-11-08 19:15:08 +01:00
Marcus Bointon c87abc860c
Don't attempt to use opportunistic TLS when connecting to localhost 2023-11-08 19:11:46 +01:00
Marcus Bointon b7dd089735
CS 2023-11-08 09:47:00 +01:00
Marcus Bointon b11a4512de
Update SMTP subclass example 2023-11-08 09:44:16 +01:00
Marcus Bointon ee4090bd62
Merge pull request #2972 from Saibamen/pl_lang_update 2023-10-31 23:08:15 +01:00
Adam Stachowicz 5ac1b59b78 Update polish language 2023-10-31 20:17:58 +01:00
dependabot[bot] a26a3cb738
GH Actions: Bump ossf/scorecard-action from 2.2.0 to 2.3.1
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.2.0 to 2.3.1.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](08b4669551...0864cf1902)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-30 06:08:11 +00:00
Marcus Bointon 8dd6558620
Merge pull request #2968 from mcardle/master
Updated da language with buggy_php string identifier
2023-10-21 15:49:12 +02:00
Ulrik McArdle 9bc85a1e6a Updated da language with buggy_php string identifier 2023-10-19 23:51:27 +02:00
Marcus Bointon a1fa2714c4
Merge pull request #2921 from PHPMailer/dependabot/github_actions/ossf/scorecard-action-2.2.0
GH Actions: Bump ossf/scorecard-action from 2.1.3 to 2.2.0
2023-10-09 13:27:29 +02:00
Marcus Bointon b915445e7c
Merge pull request #2962 from HarshitSingh96/fix/trim-null-issue
fix: null issue in trim method
2023-10-03 00:25:03 +02:00
Marcus Bointon 358be9a467
CS and early continue
If it's null or empty, we know the next test will fail too, so continue straight away
2023-10-02 11:21:51 +02:00
Harshit Singh 9c5282e2a1 Review fix 2023-10-02 14:41:26 +05:30
Harshit Singh 0a385498db fix: null issue in trim method 2023-10-02 13:18:28 +05:30
dependabot[bot] edce283afc
GH Actions: Bump actions/checkout from 3 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-11 06:14:09 +00:00
Manish Sarkar 19cf0608d1
Add Assamese transtaltions
Adds [Assamese](https://en.wikipedia.org/wiki/Assamese_language) (ISO 639-1 `AS`) translations.
2023-09-05 14:47:22 +05:30
Manish Sarkar 21355d73f4
Add Bengali translations
Adds [Bengali](https://en.wikipedia.org/wiki/Bengali_language) (ISO 639-1 `BN`) translations.
2023-09-05 14:46:05 +05:30
Marcus Bointon e88da8d679
Fix test 2023-08-29 10:26:30 +02:00
Marcus Bointon 8db93b5190
6.8.1 2023-08-29 10:18:50 +02:00
Marcus Bointon 397a4d4a44
Don't reflect a malformed DSN in error messages. It's not necessary, and carries a distant risk of XSS in the host app. 2023-08-29 09:44:47 +02:00
Marcus Bointon fa59bf6cb1
Don't use setAccessible in PHP >= 8.1 2023-08-23 16:04:36 +02:00
Marcus Bointon 267d4e5793
Avoid deprecation warning in PHP 8.3 2023-08-23 16:04:03 +02:00
Marcus Bointon 71abcf9ca5
Comments 2023-08-23 16:02:49 +02:00
Marcus Bointon 57f994d89e
Merge pull request #2930 from Ayesh/lang/si
Add Sinhalese translations
2023-07-12 12:16:02 +02:00
Marcus Bointon 83fdb21ade
Merge pull request #2929 from Ayesh/readme/langtest-path-update
Readme: Update `PHPMailerLangTest` references to `TranslationCompletenessTest`
2023-07-12 08:54:29 +02:00
Ayesh Karunaratne aec8acc047
Add Sinhalese translations
Adds [Sinhalese](https://en.wikipedia.org/wiki/Sinhala_language) (ISO 639-1 `SI`) translations.
2023-07-12 11:48:43 +08:00
Ayesh Karunaratne b5d6e4ea16
Readme: Update `PHPMailerLangTest` references to `TranslationCompletenessTest`
In #2377, the `PHPMailerLangTest` test was renamed to `TranslationCompletenessTest`
along some optimizations. However, the link in `README.md` file still links
to the old file name.

This updates the `README.md` file to use the new file name and URL.
2023-07-12 11:16:56 +08:00
dependabot[bot] e184d1f92c
GH Actions: Bump ossf/scorecard-action from 2.1.3 to 2.2.0
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.1.3 to 2.2.0.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](80e868c13c...08b4669551)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-26 06:58:25 +00:00
Marcus Bointon 9d739fb137
Merge pull request #2918 from Colinax/master 2023-06-20 22:40:17 +02:00
Colinax 1da34f41e5 remove double LANG entrie 2023-06-20 20:10:07 +02:00
Colinax b7a3f6585d remove double LANG entries 2023-06-20 19:39:57 +02:00
Marcus Bointon 312ed95ab0
Merge pull request #2909 from wera-as/master
Update phpmailer.lang-nb.php
2023-06-08 11:54:07 +02:00
Adrian Thomassen 7c56070baf Update phpmailer.lang-nb.php
- Adjusted current translations.
- Added missing translations.
2023-06-08 11:50:41 +02:00
Marcus Bointon f8242e6ff7
Comment 2023-05-21 13:47:32 +02:00
Marcus Bointon 0925c239c5
Merge pull request #2905 from yaoyingkeji/patch-2
Supplemental Chinese Simplified translation。 phpmailer.lang-zh_cn.php
2023-05-08 19:33:19 +02:00
Marcus Bointon 2e7044c0cf
CS 2023-05-08 19:26:32 +02:00
深圳市耀影科技有限公司 7c4d4f4cba
Supplemental Chinese Simplified translation。 phpmailer.lang-zh_cn.php
Supplemental Chinese Simplified translation。
补充简体中文翻译
2023-05-09 01:14:43 +08:00
Marcus Bointon e062820e54
Merge pull request #2890 from PHPMailer/dependabot/github_actions/ossf/scorecard-action-2.1.3
GH Actions: Bump ossf/scorecard-action from 2.1.2 to 2.1.3
2023-04-03 10:40:14 +02:00
dependabot[bot] 4ad37c38ce
GH Actions: Bump ossf/scorecard-action from 2.1.2 to 2.1.3
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.1.2 to 2.1.3.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](e38b1902ae...80e868c13c)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-03 06:59:05 +00:00
Marcus Bointon 2029eb194a
Merge pull request #2879 from jrfnl/feature/composer-update-dependencies
Composer: update some CS related dependencies
2023-03-06 10:23:26 -05:00
jrfnl a43c07c7ab
Composer: update some CS related dependencies
The Composer PHPCS plugin has released its 1.0.0 version. 🎉

As minors below a 1.0 are considered as majors by Composer, this needs an update to the `composer.json` file to get access to the new version.
And as PHPCS has also released a new version, may as well update that as well.

Refs:
* https://github.com/PHPCSStandards/composer-installer/releases/tag/v1.0.0
* https://github.com/squizlabs/PHP_CodeSniffer/releases/tag/3.7.2
2023-03-06 16:18:31 +01:00
Marcus Bointon 43fcc67feb
Merge pull request #2878 from jrfnl/feature/ghactions-tweaks
GH Actions: minor simplification
2023-03-06 10:12:53 -05:00
jrfnl e64259b34c
GH Actions: minor simplification
... of the bash `date` command in the earlier pulled cache busting.
2023-03-06 16:09:18 +01:00
Marcus Bointon df16b615e3
6.8.0 2023-03-06 15:43:22 +01:00
Marcus Bointon 2eb68609f2
Handle some possible issues 2023-03-06 15:42:44 +01:00
Marcus Bointon eb746e54ce
Cleanup 2023-03-06 15:42:24 +01:00
Marcus Bointon 2e1298da84
Changelog 2023-03-06 15:21:17 +01:00
Marcus Bointon e939ca1381
Merge pull request #2874 from voronkovich/support-dsn
Support instantiating from DSN string
2023-03-05 16:23:38 -05:00
Oleg Voronkovich 9880a723a2 Make DSNConfigurator::parseUrl() protected 2023-03-06 00:06:17 +03:00
Oleg Voronkovich f164395cf4 Fix URL parsing for php 5.5 2023-03-03 21:58:22 +03:00
Oleg Voronkovich 62fdf0a80b Change default secure port to 465 2023-03-03 18:43:48 +03:00
Oleg Voronkovich 8bd07461d1 Fix typo in test method name 2023-03-03 18:37:37 +03:00
Oleg Voronkovich 25269b6431 Fix typo: Mailformed -> Malformed 2023-03-03 18:34:19 +03:00
Oleg Voronkovich 7ba61cf0f0 Use DSNConfigurator::mailer() shorcut instead of PHPMailer::fromDSN() 2023-03-03 18:23:59 +03:00
Oleg Voronkovich 1e560e0afd Fix CS 2023-03-03 18:05:12 +03:00
Oleg Voronkovich b92c374b87 Fix incompatibility with PHP 7.2 2023-03-03 17:58:22 +03:00
Oleg Voronkovich ecfef2e99c Fix assigment to static variable for old PHP versions 2023-03-03 17:53:50 +03:00
Oleg Voronkovich 067ff6e7c0 Fix CS 2023-02-20 21:58:48 +03:00
Oleg Voronkovich ecc11e3bf5 Add shortcut PHPMailer::fromDSN() 2023-02-20 20:32:16 +03:00
Oleg Voronkovich 10a9c18716 Improve code 2023-02-20 20:09:11 +03:00
Oleg Voronkovich c54e14ebbe Support query string options 2023-02-20 19:51:15 +03:00
Oleg Voronkovich 4ee7bfaf96 Improve tests 2023-02-20 18:46:15 +03:00
Oleg Voronkovich 52aebc52d5 Implement SMTP(s) configuration 2023-02-20 18:28:17 +03:00
Oleg Voronkovich 53442cc3f0 Implement base configuration 2023-02-20 17:47:19 +03:00
Oleg Voronkovich 2fc807cf0c Implment DSN parsing 2023-02-20 17:22:49 +03:00
Marcus Bointon abeba566ef
Merge pull request #2869 from jayantisuthar/master
Translating some hindi language keys.
2023-02-05 12:55:20 +01:00
jayanti suthar 1d330c7ec2 hindi language improvment 2023-02-04 23:39:58 +05:30
jayanti suthar 55d3bde2be update multi line string to single line in language file 2023-02-04 23:31:12 +05:30
jay suthar 3a4cbabdfb
Revert the gitignore not needed changes 2023-02-04 23:28:42 +05:30
jayanti suthar 98a2f2c803 Translating some hindi language keys. 2023-02-04 18:07:30 +05:30
Marcus Bointon 978b96c69b
Merge pull request #2864 from detain/master
Update for my previous ZoneMTA transaction id regex fixing the regex …
2023-01-19 17:55:24 +01:00
Joe Huss 4f3151fb32 Update for my previous ZoneMTA transaction id regex fixing the regex as the id does not have parenthesis surrounding it. 2023-01-19 11:09:25 -05:00
Marcus Bointon cc1f58caf3
Merge pull request #2863 from detain/master
added SMTP Transaction ID regex for ZoneMTA mailer
2023-01-19 16:59:53 +01:00
Joe Huss ba1d2b6831 added SMTP Transaction ID regex for ZoneMTA mailer 2023-01-19 10:46:06 -05:00
Mehmet Tolga Avcioglu 00e9d3b85a fix constant array for php5 2023-01-07 22:34:29 +03:00
Mehmet Tolga Avcioglu 08d74eb04b improve xclient 2023-01-06 16:03:08 +03:00
Mehmet Tolga Avcioglu 82dd9a01fb improve xclient 2023-01-06 15:59:03 +03:00
Mehmet Tolga Avcioglu b278bc3f1b protected xclient variable and added tests 2023-01-04 14:18:40 +03:00
Mehmet Tolga Avcioglu 6384753f6e protected xclient variable and added tests 2023-01-04 14:13:07 +03:00
Mehmet Tolga Avcioglu 75991e3e46 fix cs 2023-01-03 18:03:00 +03:00
Mehmet Tolga Avcioglu 3663260209
Merge branch 'PHPMailer:master' into xclient 2023-01-03 17:46:53 +03:00
Mehmet Tolga Avcioglu a57dc65962 initial xclient implementation 2023-01-03 17:46:09 +03:00
Marcus Bointon 7c38295b17
Merge pull request #2851 from PHPMailer/dependabot/github_actions/ossf/scorecard-action-2.1.2 2022-12-26 16:32:03 +01:00
dependabot[bot] 2e21dd3778
GH Actions: Bump ossf/scorecard-action from 2.1.0 to 2.1.2
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.1.0 to 2.1.2.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](937ffa90d7...e38b1902ae)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-26 06:03:39 +00:00
Marcus Bointon 05060d446b
Merge pull request #2849 from campbell-m/master
Fixes the, admittedly rare, case when the display name is '0'.
2022-12-23 07:45:52 +01:00
campbell-m d1abc8d93a Addresses comment of @jrfnl 2022-12-22 21:45:11 +00:00
campbell-m 98a1af8ec7 Adds a test for addrFormat(). 2022-12-22 20:26:23 +00:00
campbell-m ac3f59f657 Fixes the, admittedly rare, case when the display name is '0'. 2022-12-20 20:45:14 +00:00
Marcus Bointon 9c20af3fe4
Merge pull request #2846 from PHPMailer/dependabot/github_actions/ossf/scorecard-action-2.1.0
GH Actions: Bump ossf/scorecard-action from 2.0.6 to 2.1.0
2022-12-19 16:46:37 +01:00
dependabot[bot] 1a81c80dc9
GH Actions: Bump ossf/scorecard-action from 2.0.6 to 2.1.0
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.0.6 to 2.1.0.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](99c53751e0...937ffa90d7)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-19 06:04:12 +00:00
Marcus Bointon 49cd7ea3d2
6.7.1 2022-12-08 14:30:06 +01:00
Marcus Bointon 28848ef589
Need older annotations for PHP 5.5 2022-12-06 15:46:09 +01:00
Marcus Bointon f1b2d3d9d2
Merge branch 'master' into php-8.2 2022-12-06 15:37:34 +01:00
Marcus Bointon a15a02369f
Bump dev deps 2022-12-06 15:37:20 +01:00
Marcus Bointon 26e7dec83d
Add ext-openssl suggestion 2022-12-06 15:36:12 +01:00
Marcus Bointon a3ae6b622f
Support final PHP 8.2, add PHP 8.3 as experimental 2022-12-06 15:35:05 +01:00
Marcus Bointon 80fc8686fc
6.7 2022-12-05 11:56:35 +01:00
Marcus Bointon ac9eed5ee6
Changelog 2022-12-05 11:55:23 +01:00
Marcus Bointon ea03f4a60d
Try to resolve PHP 5.5 libsqlite issue 2022-12-05 11:51:29 +01:00
Marcus Bointon a25a4dc3e3
Run PHP 5.5 on older OS 2022-12-05 11:33:21 +01:00
Marcus Bointon 3a3f39fa70
Skip qmail 2022-12-05 11:27:54 +01:00
Marcus Bointon d2e9d097c1
Be noisy 2022-12-05 11:25:20 +01:00
Marcus Bointon 0447bfc3ae
Use systemd to stop postfix 2022-12-05 10:55:43 +01:00
Marcus Bointon 7a6ab223d8
Ignore failures when stopping postfix 2022-12-05 10:39:42 +01:00
Marcus Bointon 5419bf1e4b
Wait longer between retries 2022-12-05 10:36:27 +01:00
Marcus Bointon 7418a75f7e
Run tests on Ubuntu 22.04 2022-12-05 10:29:29 +01:00
Marcus Bointon a269e44376
Changelog 2022-12-05 10:03:05 +01:00
Marcus Bointon f34724c468
CS 2022-12-05 10:02:50 +01:00
Marcus Bointon c033268049
Break out setting MIME boundaries into a protected method, fixes #2511 2022-12-05 10:01:24 +01:00
Marcus Bointon 12e5c0c6f6
Drop MIME preamble to match common email client behaviour, see #1352 2022-12-05 09:24:58 +01:00
Marcus Bointon 3228f11fb4
Don't strip non-break trailing whitespace during simple DKIM canonicalisation, fixes #2837 2022-12-05 08:37:57 +01:00
Marcus Bointon 0064f26786
Merge pull request #2830 from dotdash/dont_trash_error_details_in_keepalive
Don't let RSET errors overwrite the original error
2022-11-22 10:54:08 +01:00
Björn Steinbrink 4588e44e9b Don't let RSET errors overwrite the original error
On keep-alive connections, we issue an RSET command in case of errors.
But that RSET command may fail, which causes the error information from
the original error to be replaced by the error information from the
RSET error, which isn't helpful in diagnosing the actual cause. To avoid
this problem, we need to extract the error information first, and only
issue the RSET command afterwards.
2022-11-22 10:08:10 +01:00
Marcus Bointon 5f61e3dae7
Cast ini value to avoid coercion, fixes #2827 2022-11-18 10:17:08 +01:00
Marcus Bointon 1ca85b6116
Bump phpcs version to avoid dev issues on PHP 8.1 2022-11-18 10:16:31 +01:00
Marcus Bointon e7bd0d1f6d
Add return type annotation 2022-11-14 10:58:16 +01:00
Marcus Bointon 0b37477f02
Update Stack Overflow link 2022-11-08 08:48:31 +01:00
Marcus Bointon f8d9b332bf
Merge pull request #2821 from jrfnl/feature/ghactions-cache-busting
GH Actions: bust the cache semi-regularly
2022-11-04 23:33:13 +01:00
jrfnl 52f7e741ec
GH Actions: bust the cache semi-regularly
Caches used in GH Actions do not get updated, they can only be replaced by a different cache with a different cache key.

Now the predefined Composer install action this repo is using already creates a pretty comprehensive cache key:

> `ramsey/composer-install` will auto-generate a cache key which is composed of
the following elements:
> * The OS image name, like `ubuntu-latest`.
> * The exact PHP version, like `8.1.11`.
> * The options passed via `composer-options`.
> * The dependency version setting as per `dependency-versions`.
> * The working directory as per `working-directory`.
> * A hash of the `composer.json` and/or `composer.lock` files.

This means that aside from other factors, the cache will always be busted when changes are made to the (committed) `composer.json` or the `composer.lock` file (if the latter exists in the repo).

For packages running on recent versions of PHP, it also means that the cache will automatically be busted once a month when a new PHP version comes out.

### The problem

For runs on older PHP versions which don't receive updates anymore, the cache will not be busted via new PHP version releases, so effectively, the cache will only be busted when a change is made to the `composer.json`/`composer.lock` file - which may not happen that frequently on low-traffic repos.

But... packages _in use_ on those older PHP versions - especially dependencies of declared dependencies - may still release new versions and those new versions will not exist in the cache and will need to be downloaded each time the action is run and over time the cache gets less and less relevant as more and more packages will need to be downloaded for each run.

### The solution

To combat this issue, a new `custom-cache-suffix` option has been added to the Composer install action in version 2.2.0.
This new option allows for providing some extra information to add to the cache key, which allows for busting the cache based on your own additional criteria.

This commit implements the use of this `custom-cache-suffix` option for all relevant workflows in this repo.

Refs:
* https://github.com/ramsey/composer-install/#custom-cache-suffix
* https://github.com/ramsey/composer-install/releases/tag/2.2.0
2022-11-04 20:30:01 +01:00
Marcus Bointon a5bc7ddba9
Merge pull request #2814 from czirkoszoltan/avoid-error-message-when-could-not-connect
Avoid POP3 client error message when TCP connection failed
2022-10-27 22:24:18 +02:00
Czirkos Zoltan c6e066d061 Fix bugs in POP3 test
runfakepopserver.sh expects fakepopserver.sh to be in the working
directory, therefore the tests in PopBeforeSmtpTest have to chdir()
to the test directory first.

The line in fakepopserver.sh echoing Bye needed -en arguments for
echo to process character escapes.
2022-10-26 20:18:42 +02:00
Czirkos Zoltan b4b493c8f3 Avoid POP3 client error message when TCP connection failed
The disconnect() method throws a TypeError when the TCP
connection cannot be created. Error and trace:

fgets(): Argument #1 ($stream) must be of type resource, bool given

phpmailer/phpmailer/src/POP3.php(372): fgets()
phpmailer/phpmailer/src/POP3.php(345): PHPMailer\PHPMailer\POP3->getResponse()
phpmailer/phpmailer/src/POP3.php(230): PHPMailer\PHPMailer\POP3->disconnect()
PHPMailer\PHPMailer\POP3->authorise()

Reproduce with:

include __DIR__ . "/POP3.php";
\PHPMailer\PHPMailer\POP3::popBeforeSmtp('doesnotexist', 110);
2022-10-26 18:41:16 +02:00
Marcus Bointon 00b7f5162a
Merge pull request #2798 from czirkoszoltan/add-newline-after-pop3-quit
Add line ending \n after POP3 quit command
2022-10-25 16:44:55 +02:00
Marcus Bointon b18c6e4b2a
Merge pull request #2808 from glodzienski/master
Translating some spanish language keys.
2022-10-25 16:41:29 +02:00
Marcus Bointon a42b4e4906
Merge pull request #2804 from jrfnl/feature/ghactions-harden-cs-steps
GH Actions: harden the workflow against PHPCS ruleset errors
2022-10-25 16:37:41 +02:00
Marcus Bointon 31c59466bd
Merge pull request #2805 from PHPMailer/dependabot/github_actions/ossf/scorecard-action-2.0.6
GH Actions: Bump ossf/scorecard-action from 2.0.4 to 2.0.6
2022-10-25 16:37:07 +02:00
Glodzienski a48797717d
Updating author doc 2022-10-24 23:11:15 -03:00
Glodzienski 5902472c9e
Translating some spanish language keys. 2022-10-24 23:08:18 -03:00
dependabot[bot] c7e3d7302d
GH Actions: Bump ossf/scorecard-action from 2.0.4 to 2.0.6
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.0.4 to 2.0.6.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](e363bfca00...99c53751e0)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-24 06:16:13 +00:00
jrfnl 86fe1f6403
GH Actions: harden the workflow against PHPCS ruleset errors
If there is a ruleset error, the `cs2pr` action doesn't receive an `xml` report and exits with a `0` error code, even though the PHPCS run failed (though not on CS errors, but on a ruleset error).

This changes the GH Actions workflow to allow for that situation and still fail the build in that case.
2022-10-23 11:26:12 +02:00
Marcus Bointon 3e38b34669
Merge pull request #2793 from greew/ticket_2788/azure_xoauth2
Added Azure XOAUTH2 help and examples
2022-10-16 21:24:02 +02:00
Marcus Bointon 754ea93edb
Merge pull request #2800 from jrfnl/feature/ghactions-dont-use-set-output
GH Actions: fix use of deprecated `set-output`
2022-10-14 23:16:42 +02:00
jrfnl 70cbf85efe
GH Actions: fix use of deprecated `set-output`
GitHub has deprecated the use of `set-output` (and `set-state`) in favour of new environment files.

This commit updates the test workflows to avoid `set-output`.

Refs:
* https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
* https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#environment-files
2022-10-14 23:08:47 +02:00
Rod Elias 7e7a1a05e0
Add .editorconfig file
See: https://editorconfig.org/
2022-10-13 19:04:21 -03:00
Czirkos Zoltan 4283eb9720 Add line ending \n after POP3 quit command
This is required by some POP3 servers which will wait until
a newline char which is delimiting all commands. Without it,
the login works, but it waits for the full timeout.
2022-10-12 17:47:41 +02:00
Marcus Bointon 12bb746eff
Merge pull request #2796 from jrfnl/feature/ghactions-tweak-action-runner-version-tags
GH Actions: use semver branch/tag references instead of commit references
2022-10-11 13:46:45 +02:00
jrfnl 5a8c04a9d6
GH Actions: use semver branch/tag references instead of commit references
Most predefined action runners offer a long-running branch or a tag which gets moved every release to allow staying on the "latest" version of a certain major of their action, without having to update the workflow scripts on every release of the action runner.

This works well for action runners which follow semver.

I've reviewed the existing workflows and tweaked the versions used whenever possible to make optimal use of this.

* For the `ossf/scorecard-action` action runner, I have not been able to find a workable tag/branch to fix this on.
    Note: I have remove the "# v1.1.1" comment though as it doesn't get updated by Dependabot and was sorely out of date (you are currently on version `2.0.4`).

With the changes in this PR, Dependabot should become less noisy and will only send in PRs to update the action runner versions when a new major release has been tagged. (save for the one exceptions mentioned above)

I would recommend watching the following repos for new releases:
* https://github.com/actions/checkout
* https://github.com/actions/upload-artifact
* https://github.com/shivammathur/setup-php
* https://github.com/ramsey/composer-install
* https://github.com/nick-fields/retry
* https://github.com/codecov/codecov-action
* https://github.com/JamesIves/github-pages-deploy-action
* https://github.com/ossf/scorecard-action
* https://github.com/github/codeql-action

This will ensure you will get an email with the changelogs for those action runners on all releases, so you can still monitor for changes in the action runners you need to be aware of.
2022-10-10 19:23:47 +02:00
Jesper Skytte 849615e819
D'oh - forgot to add the example file 2022-10-08 08:02:06 +02:00
Jesper Skytte 405e5dd94a
Added Azure XOAUTH2 help and examples 2022-10-07 22:34:23 +02:00
Marcus Bointon cbfcd1f8b8
Merge pull request #2792 from sriram-km/sri-ram-contribution
Fixed gramatical errors in README.md
2022-10-07 15:55:40 +02:00
Sri Ram f035ad9db8 Fixed gramatical errors in README.md 2022-10-07 18:39:34 +05:30
Marcus Bointon 8b6386d741
6.6.5 2022-10-07 14:23:10 +02:00
Marcus Bointon 0ca9768e59
Merge pull request #2791 from Aeka123/master
Add missing translations to danish language file
2022-10-06 17:43:51 +02:00
Esben Christian Volsgaard 4cc71741c8 Add missing translations to danish language file 2022-10-06 17:40:49 +02:00
Marcus Bointon 3a407c6afb
Merge pull request #2790 from KaminskiDaniell/patch-1
Update phpmailer.lang-pl.php
2022-10-06 11:38:09 +02:00
Daniel Kamiński 46b8da84ab
Update phpmailer.lang-pl.php
I have made a few grammatical corrections in the translation of Polish
2022-10-06 11:21:30 +02:00
Marcus Bointon 45620a96c3
Merge pull request #2787 from dazsim/fix-overwritten-error-message-on-close
fix bug error message supressed on close()
2022-10-04 11:04:01 +02:00
Marcus Bointon b59b64d35d
Merge pull request #2786 from dazsim/fix-addAttachment-folder-bug
fix bug in addAttachment with folder's instead of filenames
2022-10-04 11:02:55 +02:00
Marcus Bointon 91c442fccd
Add failing test for #2786 2022-10-04 11:02:03 +02:00
Darren Sim fddd95c23e fix bug error message supressed on close() 2022-10-04 00:20:49 +01:00
Darren Sim c4ed6172a5 fix bug in addAttachment with folder's instead of filenames 2022-10-04 00:04:01 +01:00
Marcus Bointon 29cdd9af52
Merge pull request #2784 from PHPMailer/dependabot/github_actions/ossf/scorecard-action-2.0.4
GH Actions: Bump ossf/scorecard-action from 2.0.3 to 2.0.4
2022-10-03 21:05:11 +02:00
Marcus Bointon b90af7177d
Merge pull request #2783 from PHPMailer/dependabot/github_actions/github/codeql-action-2.1.26
GH Actions: Bump github/codeql-action from 2.1.24 to 2.1.26
2022-10-03 21:04:58 +02:00
Marcus Bointon 858a4c8992
Merge pull request #2785 from nexxai/master
Typofixes
2022-10-03 21:03:34 +02:00
JT Smith b894719a4c
Fixing auto-formatting 2022-10-03 12:23:05 -06:00
JT Smith ef36a69e0e Typofixes 2022-10-03 12:21:21 -06:00
dependabot[bot] d579dc362a
GH Actions: Bump ossf/scorecard-action from 2.0.3 to 2.0.4
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.0.3 to 2.0.4.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](865b409285...e363bfca00)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-03 06:17:55 +00:00
dependabot[bot] 56ce2fd740
GH Actions: Bump github/codeql-action from 2.1.24 to 2.1.26
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.1.24 to 2.1.26.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](904260d7d9...e0e5ded33c)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-03 06:17:51 +00:00
Marcus Bointon df88e14dba
Merge pull request #2770 from PHPMailer/dependabot/github_actions/github/codeql-action-2.1.24
GH Actions: Bump github/codeql-action from 2.1.22 to 2.1.24
2022-09-21 17:14:16 +02:00
dependabot[bot] de69dfc97f
GH Actions: Bump github/codeql-action from 2.1.22 to 2.1.24
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.1.22 to 2.1.24.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](b398f525a5...904260d7d9)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-21 13:49:27 +00:00
Marcus Bointon 165f449f4b
Merge pull request #2773 from dotdash/dont_rset_on_connection_error
Don't try to issue RSET on connection errors
2022-09-21 15:38:24 +02:00
Marcus Bointon 7557f5d9c3
Merge pull request #2771 from PHPMailer/dependabot/github_actions/ossf/scorecard-action-2.0.3
GH Actions: Bump ossf/scorecard-action from 2.0.2 to 2.0.3
2022-09-21 15:29:27 +02:00
Marcus Bointon d783947aba
Merge pull request #2772 from sashashura/patch-1
GitHub Workflows security hardening
2022-09-21 15:27:22 +02:00
Björn Steinbrink 703ad1052c Don't try to issue RSET on connection errors
In case of errors, keep-alive SMTP connections are always reset, but
when the error happened while establishing the connection, trying to
reset the connection is pointless and just produces another error.
2022-09-21 13:52:41 +02:00
Alex 01acbb66e0 build: harden tests.yml permissions
Signed-off-by: Alex <aleksandrosansan@gmail.com>
2022-09-20 16:12:44 +02:00
Alex a09a739fd1 build: harden docs.yaml permissions
Signed-off-by: Alex <aleksandrosansan@gmail.com>
2022-09-20 16:09:01 +02:00
dependabot[bot] a47284acc9
GH Actions: Bump ossf/scorecard-action from 2.0.2 to 2.0.3
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.0.2 to 2.0.3.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](68bf5b3327...865b409285)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-19 06:12:05 +00:00
Marcus Bointon 410086d03e
Merge pull request #2765 from PHPMailer/dependabot/github_actions/ossf/scorecard-action-2.0.2
GH Actions: Bump ossf/scorecard-action from 1.1.2 to 2.0.2
2022-09-12 09:11:03 +02:00
dependabot[bot] 6105356343
GH Actions: Bump ossf/scorecard-action from 1.1.2 to 2.0.2
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 1.1.2 to 2.0.2.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](ce330fde6b...68bf5b3327)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-12 06:24:09 +00:00
Marcus Bointon f3a9d79c6c
Explicitly add codecov token to action, see https://github.com/codecov/codecov-action/issues/557 2022-09-06 22:56:42 +02:00
Marcus Bointon 88b2d6852c
Merge pull request #2763 from PHPMailer/dependabot/github_actions/github/codeql-action-2.1.22
GH Actions: Bump github/codeql-action from 2.1.21 to 2.1.22
2022-09-05 16:16:40 +02:00
dependabot[bot] 58a18c33f8
GH Actions: Bump github/codeql-action from 2.1.21 to 2.1.22
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.1.21 to 2.1.22.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](c7f292ea4f...b398f525a5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-05 14:15:08 +00:00
Marcus Bointon 21768617e2
Fix possible null param to explode, fixes #2760 2022-09-02 23:39:13 +02:00
Marcus Bointon 65661bcf15
Merge pull request #2759 from PHPMailer/dependabot/github_actions/github/codeql-action-2.1.21
GH Actions: Bump github/codeql-action from 2.1.19 to 2.1.21
2022-08-29 10:35:48 +02:00
dependabot[bot] 971792a11d
GH Actions: Bump github/codeql-action from 2.1.19 to 2.1.21
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.1.19 to 2.1.21.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](f5d217be74...c7f292ea4f)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-29 06:18:36 +00:00
Marcus Bointon a94fdebaea
6.6.4 2022-08-22 11:22:00 +02:00
Marcus Bointon a1d5d96831
Changelog 2022-08-22 10:25:31 +02:00
Marcus Bointon 971686b484
Case 2022-08-22 10:23:26 +02:00
Marcus Bointon a89e9248ca
Changelog 2022-08-22 10:12:09 +02:00
Marcus Bointon a5c499b539
Add OSSF scorecard badge 2022-08-22 10:11:50 +02:00
Marcus Bointon 6a8157c086
Merge pull request #2757 from PHPMailer/dependabot/github_actions/github/codeql-action-2.1.19
GH Actions: Bump github/codeql-action from 1.0.26 to 2.1.19
2022-08-22 10:01:45 +02:00
Marcus Bointon dfe2167f34
Merge pull request #2750 from PHPMailer/dependabot/github_actions/actions/upload-artifact-3.1.0
GH Actions: Bump actions/upload-artifact from 3.0.0 to 3.1.0
2022-08-22 10:01:32 +02:00
Marcus Bointon d4b5cd5cc0
Merge pull request #2748 from PHPMailer/dependabot/github_actions/ossf/scorecard-action-1.1.2
GH Actions: Bump ossf/scorecard-action from 1.1.1 to 1.1.2
2022-08-22 10:01:22 +02:00
Marcus Bointon 47adaac1b6
Merge pull request #2754 from sverpoorten/master
Bugfix invalid DKIM-signature with zero To-addresses
2022-08-22 10:00:56 +02:00
Marcus Bointon 6b7dc4edab
CS 2022-08-22 09:55:30 +02:00
Marcus Bointon 53d91d3016
CS 2022-08-22 09:51:34 +02:00
dependabot[bot] a66b21a875
GH Actions: Bump github/codeql-action from 1.0.26 to 2.1.19
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 1.0.26 to 2.1.19.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](5f53256358...f5d217be74)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-22 06:27:25 +00:00
sverpoorten 0bddcf9141
Bugfix invalid DKIM-signature with zero To-addresses
When using PHP's mail() function, and when there are no To-addressees (e.g. only BCC), then the DKIM-signature was not correct. There was a discrepancy between how mail() was called (empty $to) versus the DKIM-signature ('undisclosed-recipients:;').
2022-08-21 21:13:01 +02:00
dependabot[bot] 7b407e0c50
GH Actions: Bump actions/upload-artifact from 3.0.0 to 3.1.0
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3.0.0 to 3.1.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](6673cd052c...3cea537223)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-15 06:21:16 +00:00
dependabot[bot] c15ff12611
GH Actions: Bump ossf/scorecard-action from 1.1.1 to 1.1.2
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 1.1.1 to 1.1.2.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](3e15ea8318...ce330fde6b)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-15 06:21:10 +00:00
Marcus Bointon fadcb6abe1
Create scorecards.yml
Add OSSF scorecard config
2022-08-11 13:32:11 +02:00
Marcus Bointon 21c5651c70
Merge pull request #2735 from PHPMailer/dependabot/github_actions/JamesIves/github-pages-deploy-action-4.4.0
GH Actions: Bump JamesIves/github-pages-deploy-action from 4.3.4 to 4.4.0
2022-07-25 09:32:02 +02:00
dependabot[bot] 5d4233bb1b
GH Actions: Bump JamesIves/github-pages-deploy-action
Bumps [JamesIves/github-pages-deploy-action](https://github.com/JamesIves/github-pages-deploy-action) from 4.3.4 to 4.4.0.
- [Release notes](https://github.com/JamesIves/github-pages-deploy-action/releases)
- [Commits](https://github.com/JamesIves/github-pages-deploy-action/compare/v4.3.4...v4.4.0)

---
updated-dependencies:
- dependency-name: JamesIves/github-pages-deploy-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-25 06:21:06 +00:00
Marcus Bointon a04c4c2d72
Clarify SMTP auth options, fixes #2732 2022-07-19 17:12:48 +02:00
Marcus Bointon fb45a2e39b
Use higher debug level when demonstrating TLS options 2022-07-09 17:03:22 +02:00
Marcus Bointon 4d44b65893
Merge pull request #2728 from evan70/master
trim(): Passing null to parameter  ($string) of type string is deprecated
2022-07-08 00:15:12 +02:00
Marcus Bointon 10a6e3ec25
Cleanup 2022-07-08 00:12:21 +02:00
evan70 26371755e6
Update PHPMailer.php 2022-07-07 23:45:52 +02:00
Marcus Bointon 34cafe9fc9
Changelog 2022-07-07 16:57:11 +02:00
Marcus Bointon cfede8fcbb
Merge pull request #2727 from Cleptomania/csv
Automatic text/csv detection
2022-07-07 16:54:52 +02:00
Darren Eberly 1eb0816252 Automatic text/csv detection 2022-07-07 10:47:06 -04:00
Marcus Bointon 375d77cef7
CS 2022-06-29 11:10:48 +02:00
Marcus Bointon c4a787bff7
CS 2022-06-29 11:09:55 +02:00
Marcus Bointon a4d8cf15ce
Add tests for #2723 2022-06-29 11:04:13 +02:00
Marcus Bointon 95f76e7588
Merge pull request #2723 from mortalys/string-verification-for-name
Verification is required
2022-06-29 10:39:29 +02:00
mortalys e5f9e2aefc
Verification is required 2022-06-29 09:20:16 +01:00
Marcus Bointon 9175946830
Merge pull request #2720 from PHPMailer/dependabot/github_actions/JamesIves/github-pages-deploy-action-4.3.4
GH Actions: Bump JamesIves/github-pages-deploy-action from 4.3.3 to 4.3.4
2022-06-27 09:42:01 +02:00
dependabot[bot] bad18bda11
GH Actions: Bump JamesIves/github-pages-deploy-action
Bumps [JamesIves/github-pages-deploy-action](https://github.com/JamesIves/github-pages-deploy-action) from 4.3.3 to 4.3.4.
- [Release notes](https://github.com/JamesIves/github-pages-deploy-action/releases)
- [Commits](https://github.com/JamesIves/github-pages-deploy-action/compare/v4.3.3...v4.3.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-27 06:20:15 +00:00
Marcus Bointon b8660e71ff
Changelog 2022-06-21 11:11:16 +02:00
Marcus Bointon 5b9b137b70
Merge pull request #2717 from panos78/patch-1
Update Greek translation
2022-06-21 11:10:08 +02:00
Panos 4bced5294f
Update Greek translation
Adding missing strings.
Enhancing existing strings for better understanding.
2022-06-21 08:22:02 +03:00
Marcus Bointon 9400f305a8
6.6.3 2022-06-20 11:21:02 +02:00
Marcus Bointon e6fbc528c5
Merge pull request #2714 from ZhangChengLin/master-zcl
ISO 639-1 Language code and content do not match
2022-06-20 11:16:35 +02:00
Marcus Bointon e39958ed89
Don't put this in .gitignore 2022-06-20 11:16:07 +02:00
Marcus Bointon ef60bd95dc
Update changelog.md 2022-06-19 13:59:42 +02:00
Marcus Bointon f06453cbed
Merge pull request #2306 from wispas/patch-1
Create phpmailer.lang-mgl.php
2022-06-19 13:59:00 +02:00
Marcus Bointon 090e168fa9
Cleanup 2022-06-19 13:55:57 +02:00
ZhangChengLin 2f7852929d Add IDE configuration directory ".idea" 2022-06-18 23:19:37 +08:00
ZhangChengLin 1023717ed7 ISO 639-1 Language code and content do not match 2022-06-18 22:58:35 +08:00
Marcus Bointon 52d82dbdef
Merge pull request #2459 from rx80/patch-1
Simplify use of get_oauth_token.php
2022-06-17 00:20:22 +02:00
Marcus Bointon 7599b516d4
Changelog 2022-06-17 00:20:04 +02:00
Marcus Bointon 54afdfecb5
CS 2022-06-17 00:17:12 +02:00
Marcus Bointon ac12a9de6e
cleanup 2022-06-17 00:11:49 +02:00
Marcus Bointon 2f4b684353
Merge pull request #2707 from MathiasReker/0-simplified-if-return
simplified if return
2022-06-16 20:36:39 +02:00
Marcus Bointon 77d4559c26
Cleanup 2022-06-16 20:33:55 +02:00
Marcus Bointon 4daa547921
Remove unnecessary cast
Co-authored-by: Juliette <663378+jrfnl@users.noreply.github.com>
2022-06-16 20:17:10 +02:00
Marcus Bointon 70fde2aee4
Merge pull request #2713 from MathiasReker/0-no-superfluous-elseif
no superfluous elseif
2022-06-16 19:50:38 +02:00
Marcus Bointon 8fe6c1296d
Merge pull request #2710 from MathiasReker/0-explicit-indirect-variable
explicit indirect variable
2022-06-16 19:46:14 +02:00
MathiasReker b9b12cfc6d no superfluous elseif
Replaces superfluous elseif with if.
2022-06-16 19:35:23 +02:00
MathiasReker 998bfddd69 explicit indirect variable
Add curly braces to indirect variables to make them clear to understand.
2022-06-16 19:34:47 +02:00
MathiasReker 0747b8ca05 simplified if return
Simplify if control structures that return the boolean result of their condition.
2022-06-16 19:33:09 +02:00
Marcus Bointon a4d87ad5bd
CS 2022-06-15 22:15:55 +02:00
Marcus Bointon d610dddcf9
CS 2022-06-15 22:15:28 +02:00
Marcus Bointon 3aaac73c6d
Improve docs on addEmbeddedImage 2022-06-15 22:05:22 +02:00
Marcus Bointon b52ed06864
6.6.2 2022-06-14 11:27:21 +02:00
Marcus Bointon 2aa2bd20db
Try alternative docs publishing action 2022-06-14 11:14:49 +02:00
Marcus Bointon 7b46afb098
Merge pull request #2700 from jrfnl/feature/composer-update-parallel-lint-restraints
Composer: update PHP Parallel Lint and Console Highlighter
2022-06-14 10:59:28 +02:00
jrfnl 29177b4766
Composer: update PHP Parallel Lint and Console Highlighter
PHP Console Highlighter has released version `1.0.0` and PHP Parallel Lint version `1.3.2` is the first PHP Parallel Lint version which supports PHP Console Highlighter `1.0.0`.

As the minimum supported PHP version is still PHP 5.3 for both, we can safely update both dependency requirements.

Refs:
* https://github.com/php-parallel-lint/PHP-Console-Highlighter/releases/tag/v1.0.0
* https://github.com/php-parallel-lint/PHP-Parallel-Lint/releases/tag/v1.3.2
2022-06-14 10:53:57 +02:00
Marcus Bointon 8819eba844
Merge pull request #2665 from jrfnl/feature/lint-show-deprecated
Composer script: show deprecations when linting and update lint dependencies
2022-06-14 10:49:01 +02:00
Marcus Bointon a4bf414da6
6.6.1 2022-06-14 10:19:03 +02:00
Marcus Bointon 0ad3a474af
Don't clear errors on RSET, fixes #2696 2022-06-14 10:17:49 +02:00
Marcus Bointon bf99c202a9
Avoid passing null to functions, fixes #2667 2022-04-12 10:05:58 +02:00
Marcus Bointon 88a21e101f
Merge pull request #2666 from PHPMailer/dependabot/github_actions/maxheld83/ghpages-0.3.0
GH Actions: Bump maxheld83/ghpages from 0.2.1 to 0.3.0
2022-04-07 22:33:00 +02:00
dependabot[bot] 8ab58f1d16
GH Actions: Bump maxheld83/ghpages from 0.2.1 to 0.3.0
Bumps [maxheld83/ghpages](https://github.com/maxheld83/ghpages) from 0.2.1 to 0.3.0.
- [Release notes](https://github.com/maxheld83/ghpages/releases)
- [Commits](https://github.com/maxheld83/ghpages/compare/v0.2.1...v0.3.0)

---
updated-dependencies:
- dependency-name: maxheld83/ghpages
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-07 20:19:01 +00:00
Marcus Bointon 3480465914
Merge pull request #2664 from jrfnl/feature/add-dependabot-config-for-ghactions
Add dependabot configuration file
2022-04-07 22:18:30 +02:00
jrfnl 38355bb140
Composer script: show deprecations when linting
While rare, there are some deprecations which PHP can show when a file is being linted.
By default these are ignored by PHP-Parallel-Lint.

Apparently though, there is an option to show them (wasn't documented until recently), so let's turn that option on.
2022-04-07 14:05:06 +02:00
jrfnl b7ba94e0f5
Add dependabot configuration file
This commit adds an initial Dependabot configuration to:
* Submit pull requests for security updates and version updates for GH Action runner dependencies.

At a later point in time, it could be considered to enable it for Composer dependencies as well.

The configuration has been set up to:
* Run weekly.
* Submit a maximum of 5 pull requests at a time.
    If additional pull requests are needed, these will subsequently be submitted the next time Dependabot runs after one or more of the open pull requests have been merged.
* The commit messages for PRs submitted by Dependabot will be prefixed with "GH Actions:" similar to previous PRs I've submitted manually for the same.
2022-04-07 14:04:02 +02:00
Marcus Bointon 0ddee75e3a
Merge pull request #2663 from jrfnl/feature/ghactions-update-codecov
GH Actions: version update for codecov action runner
2022-04-07 11:13:36 +02:00
jrfnl ee3570ea70
GH Actions: version update for codecov action runner
Yet another predefined action has had a major release.

This is, again, mostly just a change of the Node version used by the action itself (from Node 12 to Node 16).

Refs:
* https://github.com/codecov/codecov-action/releases
2022-04-05 23:49:50 +02:00
Marcus Bointon 0912769c66
#SlavaUkraini 2022-03-11 07:35:51 +01:00
Marcus Bointon 85350ad372
#SlavaUkraini 2022-03-11 07:33:49 +01:00
Marcus Bointon 76b348ebac
Fix test order 2022-03-08 22:39:06 +01:00
Marcus Bointon a3028ab03b
This wasn't actually testing BCC-only addressing! 2022-03-08 22:37:13 +01:00
Marcus Bointon c402bb4425
Merge pull request #2641 from jrfnl/feature/ghactions-update-various-actions
GH Actions: version update for various predefined actions
2022-03-05 23:58:38 +01:00
jrfnl 21856c00e5
GH Actions: version update for various predefined actions
A number of predefined actions have had major release, which warrant an update the workflow(s).

These updates don't actually contain any changed functionality, they are mostly just a change of the Node version used by the action itself (from Node 14 to Node 16).

Refs:
* https://github.com/actions/checkout/releases
2022-03-05 15:36:07 +01:00
Marcus Bointon e43bac82ed
Changelog 2022-02-28 16:31:21 +01:00
Marcus Bointon ce32116f3b
Merge pull request #2526 from miken32/master
Provide additional error details after connection failures
2022-02-28 16:08:19 +01:00
Marcus Bointon 3525f1b6da
Give up on that test config 2022-02-28 16:03:27 +01:00
Marcus Bointon 70c20c6324
Rearrange tests to deal with version issues 2022-02-28 15:48:25 +01:00
Marcus Bointon cb53dde517
6.6.0 2022-02-28 15:26:21 +01:00
Marcus Bointon 03649a2ffb
CS 2022-02-28 15:11:05 +01:00
Marcus Bointon ec421d0680
CS 2022-02-28 15:09:27 +01:00
Marcus Bointon d8002e5482
Add simple OAuthTokenProvider tests 2022-02-28 15:06:17 +01:00
Marcus Bointon 5a4f1f3a2a
Changelog 2022-02-28 14:36:07 +01:00
Marcus Bointon 2611db096a
Merge pull request #2524 from pdscopes/feature/oauth-interface
#2523 OAuth Interface
2022-02-28 14:32:31 +01:00
Marcus Bointon a24029b108
Add corrected @covers tag 2022-02-18 18:21:21 +01:00
Marcus Bointon c0d9f7dd3c
6.5.4 2022-02-17 09:19:04 +01:00
Marcus Bointon 7421ac9186
Changelog 2022-02-17 09:18:00 +01:00
Marcus Bointon a876f998bd
Avoid PHPUnit 4.8 issue in PHP 5.5! 2022-02-16 20:03:35 +01:00
Marcus Bointon 6f6ce4f34a
Add XMailer tests 2022-02-16 19:32:38 +01:00
Marcus Bointon b930f1587f
Rejig setting XMailer to avoid PHP 8.1 issue, fixes #2635 2022-02-16 19:32:11 +01:00
Marcus Bointon 7ac1bd3ac0
Restrict shell-based mailers if we can't use them safely, fixes #966 2022-02-16 17:39:25 +01:00
Marcus Bointon 7e1da4fae3
Merge pull request #2594 from jrfnl/feature/ghactions-update-codecov-action
GH Actions: version update for `codecov/codecov-action`
2022-02-05 01:15:49 +01:00
jrfnl a4cf5b6e89 GH Actions: version update for `codecov/codecov-action`
A while back the `codecov/codecov-action` released a new major.

As per the release notes:
> On February 1, 2022, the v1 uploader will be full sunset and no longer function. This is due to the deprecation of the underlying bash uploader. This version uses the new uploader.

Considering Feb 2022 is creeping closer every day, updating seems prudent.

> Multiple fields have not been transferred from the bash uploader or have been deprecated. Notably many of the `functionalities` and `gcov_` arguments have been removed.

This repo does not seem to be affected by this.

Refs:
* https://github.com/codecov/codecov-action/releases/tag/v2.0.0
* https://github.com/codecov/codecov-action/releases/tag/v2.0.1
* https://github.com/codecov/codecov-action/releases/tag/v2.0.2
* https://github.com/codecov/codecov-action/releases/tag/v2.0.3
* https://github.com/codecov/codecov-action/releases/tag/v2.1.0
2021-12-26 19:38:16 +01:00
Marcus Bointon d4bf3504b9
Merge pull request #2595 from jrfnl/feature/ghactions-update-actions-checkout
GH Actions: version update for `actions/checkout`
2021-12-26 19:26:31 +01:00
jrfnl fbfc9f2909 GH Actions: version update for `actions/checkout`
Ref: https://github.com/actions/checkout/releases
2021-12-26 00:39:36 +01:00
Marcus Bointon 8c952fb573
Merge pull request #2590 from jrfnl/feature/ghactions-update-composer-action 2021-12-24 10:08:01 +01:00
jrfnl 7fe0ce642b GH Actions: version update for `ramsey/composer-install`
The action used to install Composer packages and handle the caching has released a new major (and some follow-up patch releases), which means, the action reference needs to be updated to benefit from it.

Refs:
* https://github.com/ramsey/composer-install/releases/tag/2.0.0
* https://github.com/ramsey/composer-install/releases/tag/2.0.1
* https://github.com/ramsey/composer-install/releases/tag/2.0.2
2021-12-24 05:09:10 +01:00
Marcus Bointon efd3262af8
Merge pull request #2589 from jrfnl/feature/composer-allow-phpcs-plugin 2021-12-23 08:19:51 +01:00
jrfnl d94fd80848 Composer: allow the PHPCS plugin
The `dealerdirect/phpcodesniffer-composer-installer` Composer plugin is used to register external PHPCS standards with PHPCS.

As of Composer 2.2.0, Composer plugins need to be explicitly allowed to run. This adds the necessary configuration for that.

Refs:
* https://blog.packagist.com/composer-2-2/#more-secure-plugin-execution
2021-12-23 03:05:11 +01:00
Marcus Bointon 8c7fe5e688
Merge pull request #2588 from nogaruki/patch-1
Update phpmailer.lang-fr.php
2021-12-22 19:56:30 +01:00
nogaruki f62d638c0b
Update phpmailer.lang-fr.php 2021-12-22 15:39:32 +01:00
Marcus Bointon a69cfb1860
Merge pull request #2584 from jrfnl/feature/php-8.2-fix
Bug fix for typo in property name (x2)
2021-12-18 17:51:36 +01:00
jrfnl 9c88a5ca9b Bug fix for typo in property name (x2)
The `$CharSet` property name as declared in the class starts with a capital, while there were two places in the code where the property was referred to as `$this->charSet`, which is a non-existent property.

In PHP 8.2, this is regarded as access to a dynamic property and will generate deprecation notices.

In effect, this meant that the `PHPMailer::parseAddresses()` method would be called with `null` as the value for the `$charset` parameter.
This `null` value would then subsequently be passed on to the PHP native `mb_internal_encoding()` function, which now didn't get the correct encoding.

This may have led to mail sending failures due to the address encoding being incorrect. If there are any bug reports open for this, it may be a good idea to evaluate whether they could be related to this bug.

Found by dseguy via Exakat.

Note: this issue was not flagged by the tests as the tests for the `PHPMailer::parseAddresses()` method, only test the method either with a valid value for encoding òr without the `$charset` parameter set, but not with an explicit `null` value..

As the `$charset` parameter for `PHPMailer::parseAddresses()` has a sensible default value and is not explicitly nullable, adding a test for this incorrect use of the method seems over the top.

I have, however, ensured that the non-nullability of the parameter is now documented for the method.

Refs:
* https://wiki.php.net/rfc/deprecate_dynamic_properties
* https://www.php.net/manual/en/function.mb-internal-encoding.php
2021-12-18 17:42:39 +01:00
Marcus Bointon ff796f28f6
Merge pull request #2583 from jrfnl/feature/composer-update-version-constraints
Composer: update version constraints
2021-12-18 17:12:27 +01:00
jrfnl d5a5ad19cd CS: minor cleanup
PHPCS 3.6.2 added a sniff for a PSR-12 rule which was previously not strictly checked: "No blank line after the opening brace of a class".

This fixes the newly flagged issues.
2021-12-18 04:08:22 +01:00
jrfnl 17cd8a8c11 Composer: update version constraints
Follow up on c1a6339108 which enabled PHP 8.1 support, let's make sure that the version constraints of (dev) dependencies are such that PHP 8.1 compatible versions will be installed.

Refs:
* https://github.com/php-parallel-lint/PHP-Parallel-Lint/releases
* https://github.com/squizlabs/PHP_CodeSniffer/releases
2021-12-18 04:03:22 +01:00
Marcus Bointon a127e25118
Merge pull request #2578 from Fonata/patch-1
Add smtp_transaction_id pattern for Mailjet
2021-12-08 19:02:16 +01:00
Fonata 844c1fc933
Declare object variable $Smtp for PHP 8.2 compatibility
In PHP 8.2 dynamic property are deprecated.
2021-12-08 18:53:21 +01:00
Fonata 290b2e36d1
Add smtp_transaction_id pattern for Mailjet
Responses from the Mailjet servers look like this:  
`250 OK queued as a08b7f37-ed61-423a-ba75-38ed2fd4b54c`
2021-12-08 11:46:36 +01:00
Marcus Bointon d3f566012b
Fix bug in multiple file upload example, fixes #2569 2021-11-28 14:39:03 +01:00
Marcus Bointon baeb7cde6b
PHPMailer 6.5.3 2021-11-25 17:34:11 +01:00
Marcus Bointon 40ede8cc04
PHPMailer 6.5.2 2021-11-25 17:22:48 +01:00
Marcus Bointon c1a6339108
Enable PHP 8.1 2021-11-25 17:22:48 +01:00
Marcus Bointon 2649f9d70f Changelog 2021-11-19 19:33:09 +01:00
Marcus Bointon 1abbf09a3b CS 2021-11-19 19:32:01 +01:00
Marcus Bointon eaac722adf
Merge pull request #2564 from j-bernard/fix_2563
Fix #2563: Provide the right flags to IDN methods for email addresses conversion
2021-11-19 19:31:01 +01:00
Julien BERNARD 3c81f485df Fix #2563: Provide the right flags to IDN methods for email addresses conversion 2021-11-19 13:19:50 -05:00
Marcus Bointon e84b657160
Merge pull request #2558 from Fonata/patch-1
Improve spelling and code style in SMTP.php
2021-11-12 15:23:01 +01:00
Fonata 50cc644d0e
Avoid identical line in both `if` and `else` branch 2021-11-12 14:00:42 +01:00
Fonata 61d2d02515
Improve spelling in DocBlock 2021-11-12 13:59:28 +01:00
Fonata ea31254c41
Code style: explicit return value in getServerExt 2021-11-12 13:57:38 +01:00
Marcus Bointon 72c1e32d5e
Merge branch 'BlazOrazem/master' 2021-10-22 15:37:47 +02:00
Marcus Bointon ef4081ea99
Line breaks in translations are not supported as of 6.5.0 2021-10-22 15:37:35 +02:00
Marcus Bointon 477762e7fc
Merge branch 'patch-1' 2021-10-22 15:34:50 +02:00
Marcus Bointon 35e45fd907
Cleanup 2021-10-22 15:34:38 +02:00
Marcus Bointon 22376a8669
Merge branch 'ro_lang' 2021-10-22 15:29:26 +02:00
Marcus Bointon 8536acacef
Line breaks in translations are not supported as of 6.5.0 2021-10-22 15:28:45 +02:00
Marcus Bointon b52af5002c
Merge branch 'feature/update-translation-pt-br' 2021-10-22 15:24:15 +02:00
Marcus Bointon f0798e729a
Merge pull request #2531 from geidsonc/feature/update-translation-pt-br
Update language portuguese brazilian
2021-10-22 15:23:34 +02:00
Marcus Bointon 066dde51bd
Trailing break 2021-10-22 15:22:23 +02:00
Marcus Bointon 485a2b6fea
Line breaks in translations are not supported as of 6.5.0 2021-10-22 15:22:13 +02:00
Geidson Benicio Coelho af14a5f43e Update language portuguese brasilian 2021-10-22 02:29:03 -03:00
Alex 9d278f37d2 Update romanian translation 2021-10-21 18:42:03 +01:00
Marcus Bointon 537927b550
Fix for ini_get issue in PHP 5.6, fixes #2529 2021-10-20 16:39:14 +02:00
Machou a2bfc160b1
fr_FR update
I corrected the spaces with this one: U+202F

I don't understand the problem, can you please explain?
2021-10-12 04:50:06 +02:00
Michael Newton 05e70e859c throw exception with details for connection failures 2021-10-11 11:45:39 -04:00
Michael Newton 7b4e8cdf92 add details from SMTP::getError() to STARTTLS exceptions 2021-10-11 11:43:27 -04:00
Blaž Oražem 56051ae53d Fix some more styles 2021-10-11 16:41:36 +02:00
Blaž Oražem 3b01c7675c Fix styles 2021-10-11 16:38:00 +02:00
Blaž Oražem a7acec2ae7 Slovenian language update 2021-10-11 16:07:16 +02:00
Peter Scopes 6b5b318025 #2523 updates OAuthTokenProvider usage to gmail_xoauth.phps 2021-10-11 10:26:51 +01:00
Peter Scopes 21974a05a1 #2523 adds OAuthTokenProvider interface to allow for other oauth libraries 2021-10-11 09:44:18 +01:00
Marcus Bointon cbfe93b75a
CS 2021-10-04 17:20:23 +02:00
Marcus Bointon ca09c748ea
Merge pull request #2519 from miken32/master
POP3 cleanup
2021-10-04 17:15:39 +02:00
Michael Newton c01d14b8be
don't wait for checkResponse result before failing 2021-10-04 08:44:43 -06:00
Michael Newton dc854c4671
capture server response to QUIT command
and properly set `$connected` property to false
2021-10-04 08:40:32 -06:00
Marcus Bointon be98d62e36
Merge pull request #2510 from jrfnl/feature/phpunit-update-config
PHPUnit: update configuration
2021-09-26 22:35:36 +02:00
jrfnl 8732627d40 PHPUnit: update configuration
PHPUnit just released version 9.5.10 and 8.5.21.

This contains a particular (IMO breaking) change:

> * PHPUnit no longer converts PHP deprecations to exceptions by default (configure `convertDeprecationsToExceptions="true"` to enable this)

Let's unpack this:

Previously (PHPUnit < 9.5.10/8.5.21), if PHPUnit would encounter a PHP native deprecation notice, it would:
1. Show a test which causes a deprecation notice to be thrown as **"errored"**,
2. Show the **first** deprecation notice it encountered and
3. PHPUnit would exit with a **non-0 exit code** (2), which will fail a CI build.

As of PHPUnit 9.5.10/8.5.21, if PHPUnit encounters a PHP native deprecation notice, it will no longer do so. Instead PHPUnit will:
1. Show a test which causes a PHP deprecation notice to be thrown as **"risky"**,
2. Show the **all** deprecation notices it encountered and
3. PHPUnit will exit with a **0 exit code**, which will show a CI build as passing.

This commit reverts PHPUnit to the previous behaviour by adding `convertDeprecationsToExceptions="true"` to the PHPUnit configuration.

Refs:
* https://github.com/sebastianbergmann/phpunit/blob/9.5/ChangeLog-8.5.md
* https://github.com/sebastianbergmann/phpunit/blob/9.5/ChangeLog-9.5.md
2021-09-25 19:08:59 +02:00
Marcus Bointon 40a12618ea
Garbage removal! 2021-08-29 19:41:57 +02:00
Marcus Bointon dd803df5ad
Remove invalid default from address (and name)! Fixes #2396 2021-08-18 11:14:16 +02:00
Marcus Bointon fd06e7614a
Remove wrong tests 2021-08-18 11:05:30 +02:00
Marcus Bointon c5d0f48730
Not needed 2021-08-18 11:05:17 +02:00
Marcus Bointon a99b249d42
6.5.1 2021-08-18 10:39:34 +02:00
Marcus Bointon 5d7f077daa
CS 2021-08-18 10:37:43 +02:00
Marcus Bointon 99937ed637
Fixes #2470 and #2471 2021-08-18 10:35:47 +02:00
Marcus Bointon a4548d7ebe
Merge pull request #2472 from Arisophy/master
Japanese messages
2021-08-17 15:03:33 +02:00
Arisophy 942da89fc2
Update LocalizationTest.php
Restore the leading space.
2021-08-17 20:59:17 +09:00
Arisophy 8de64a0ba1
Update phpmailer.lang-ja.php
Restore the leading space.
2021-08-17 20:56:49 +09:00
Arisophy ecb661448f
Update phpmailer.lang-ja.php
Add author
2021-08-17 11:43:22 +09:00
Arisophy 3f358ab478
Update LocalizationTest.php
Remove extra whitespace
2021-08-17 11:40:28 +09:00
Arisophy de0a1e1af6
Update phpmailer.lang-ja.php 2021-08-15 15:43:19 +09:00
rx80 eed7ef5061
Simplify use of get_oauth_token.php
Add a form the user can fill in, avoiding the need to modify clientId and clientSecret in code.
2021-07-28 12:50:34 +00:00
Marcus Bointon 620c2a66c5
Merge pull request #2451 from jrfnl/feature/tests-add-tests-html2text
Tests: introduce dedicated tests for the `PHPMailer::html2text()` method
2021-07-16 12:10:14 +02:00
Marcus Bointon 9243b4bb0e
Merge pull request #2452 from jrfnl/feature/2418-improve-and-test-localization
PHPMailer::setLanguage(): various fixes + add tests for localization
2021-07-13 19:39:51 +02:00
jrfnl 5e833628dc Tests: introduce dedicated tests for the `PHPMailer::html2text()` method
So far, this method did not have dedicated tests.

The test file this commit introduces, tests all aspects of the method as well as documents the current behaviour of the method for specific, outlier situations.
2021-07-13 19:17:45 +02:00
jrfnl 9825cacc20 PHPMailerTest: remove setLanguage() test
... which wasn't actually testing anything at all.
2021-07-13 19:04:27 +02:00
jrfnl 913fb552ab Tests: introduce dedicated tests for text localization
So far, the methods related to text localization - `PHPMailer::setLanguage()`, `PHPMailer::getTranslations()` and `PHPMailer::lang()` - did not have dedicated tests.

The test file this commit introduces, tests all aspects of these methods, including the changes introduced in response to 2418 and 2419, as well as documents the current behaviour of the methods for specific, outlier situations.
2021-07-13 19:04:27 +02:00
jrfnl 4ba13807a4 PHPMailer::setLanguage(): allow for "lang(_script)?(_country)?" codes
Language codes which were "language-script" based were not accepted by the regex used, which meant that the `sr_latn` script could never be loaded.

After discussion in 2418, it was decided to support "script" in a language code and to support it like so:
```
2-character language code [_] optional 4-character script code [_] optional 2-character country code
```

This combines the annotation forms of the following known standards:
* https://unicode-org.github.io/cldr-staging/charts/37/summary/root.html
* https://docs.oracle.com/cd/E23824_01/html/E26033/glset.html
* http://www.loc.gov/standards/iso639-2/php/code_list.php

This means that all of the below codes will now pass the language code validation:
```
sr
sr_latn
sr_rs
sr_latn_rs
```

But not:
```
sr_rs_latn
```

This commit applies the above change and also adjusts the "language code fall back" logic to take language codes with a script code into account.
Note: if the requested full "language-script-country" code is not available, "language-country" will take precedence over "language-script" for the fallback logic to find the appropriate translation file.

Related to 2418 - observation 4
2021-07-13 19:04:27 +02:00
jrfnl 3635e97510 PHPMailer::setLanguage(): fix "lang_country" codes do not fall back to "lang"
When the  `$langCode` is passed as "language code - country code" and no translation is found for the specified country variant, the localization would automatically fall back to English, even when there was a viable translation available in the "parent" language, i.e. just based on the _language code_.

This commit changes the logic in the `PHPMailer::setLanguage()` method for when a "lang-country" code is passed.
It will now try and find a "lang-country" file first, if not found, it will try to find a file for just the "lang" and only if that could also not be found, it will fall back to English.

Related to 2418 - observation 2

Includes using named subpatterns in the regex to make the regex self-documenting.

Includes removing a commented out line of code which is superseded anyway.
2021-07-13 19:04:27 +02:00
jrfnl aaf18fd5b2 PHPMailer::setLanguage(): match language codes case-insensitively
For "language code - country code" locale notations, it is common for the "country code" part to be provided in uppercase, like `pt_BR`.

The method currently did not allow for that correctly. The regex check would accept the language code, but then fail to find the file on *nix based systems as the file names are all in lowercase and non-Windows file systems are generally case-sensitive. Which means that in effect, the method, ended up falling back to the default language (English).

The change in this commit makes the handling of the provided `$langcode` case-tolerant.

Note: the language code used in the file names for the language files is still expected to always be lowercase, including for language files in custom paths!

Related to 2418 - observation 1
2021-07-13 19:04:27 +02:00
jrfnl 9182613398 PHPMailer::setLanguage(): make return value consistent
The return value of the method was inconsistent as it could return `true` even when the requested language was not loaded/set.

Previously, the method would:
* Return `false` when a `$langcode` was matched against the regex, but the file couldn't be loaded.
* Return `true` in all other cases, including when a `$langcode` other than `'en'` was passed, but it didn't match the regex, which meant that effectively the requested language was ignored and English was loaded anyway, but the function would still return `true`.

This has now been changed to:
* Return `true` when the requested language was loaded, whether `'en'` or another language.
* Return `false` when the requested language wasn't loaded and the language defaulted to English.

Related to https://github.com/PHPMailer/PHPMailer/issues/2418#issuecomment-876240778
2021-07-13 19:04:27 +02:00
Marcus Bointon 5c64f7e2d8
Merge pull request #2449 from jrfnl/feature/parseaddresses-bug-fix-2-mbstring-needs-charset
PHPMailer::parseAddresses(): bug fix [2] - Mbstring encoding
2021-07-13 09:46:07 +02:00
jrfnl 228338fe7e PHPMailer::parseAddresses(): bug fix [2] - Mbstring encoding
The `mb_decode_mimeheader()` function uses the Mbstring internal encoding to decode.

In PHP 5.5, the default internal encoding was `ISO-8859-1`.
As of PHP 5.6, the default internal encoding was changed to use the value from the `default_charset` ini setting. Additionally, in UTF-8, the value for `default_charset` was changed to `UTF-8`.

This means that when the charset is not explicitly set, the `mb_decode_mimeheader()` function may return garbled nonsense if the charset used to _encode_ does not match the charset per PHP's `default_charset` or - in PHP 5.5 - the Mbstring internal_encoding default.

So far, this wasn't making tests fail because of some hard-coded ini settings being passed in the CI.
However, changing the default ini values creates an assumption that that configuration will be used on all servers on which the PHPMailer code will be run.
This assumption is undocumented (not in the Readme or mentioned elsewhere) and will in most cases be incorrect.

The non-default ini values change the behaviour of PHP and were the cause of test failures against PHP 5.5 which I've been seeing for some of the new tests I've been creating.
Removing the changes fixes those errors, but exposes failing tests in the existing tests for `PHPMailer::parseAddresses()`.

These undocumented _changes_ to the default PHP configuration were **required** for PHPMailer to be able to parse the addresses successfully. As this library is open source and used in a wide variety of environments, those kind of assumptions can not safely be made.

So.... the hard-coded ini settings in the CI configuration ought to be removed.

This then causes the tests for the `PHPMailer::parseAddresses()` function to start failing on PHP 5.5.
> Note: the tests are only failing on PHP 5.5 as the test case causing the failure uses a UTF-8 encoded name and as of PHP 5.6, the default encoding used in PHP is UTF-8, which matches.
> If a test case would be added with a name encoded in a different charset, the tests would also start failing on PHP 5.6+.

To fix those failures and to make the code PHP cross-version compatible, including with PHP installs configured to use a different `default_encoding`:
* We need to make sure that the Mbstring "internal encoding" is set correctly based on the Charset used for PHPMailer.
* And then need to _reset_ the internal encoding after the use of the `mb_decode_mimeheader()` to prevent any impact of this change on the wider application context in which PHPMailer may be used.

As the `PHPMailer::parseAddresses()` method is `static`, it does not have access to the (non-static) `PHPMailer::$charSet` variable.
Knowing that, I've elected to add an additional, optional variable to the `PHPMailer::parseAddresses()` method to allow for passing in the charset and have set the default value for the parameter to be in line with the default value of the `PHPMailer::$charSet` variable.

I have adjusted existing method calls to this method to explicitly pass the charset.
Both of the adjusted function calls are in the "postSend" part of the PHPMailer logic when the charset will be known and final, so can be safely passed.

I've also made minimal changes to the unit test file to allow for passing the charset in the tests.

This implementation is based on the assumption that names can be encoded in different charsets.
If the name encoding only happens when the charset is UTF-8, the new function parameter can be removed and the charset can be set to UTF-8 directly.

As I'm not completely read-in on the RFC specs for the address header being parsed and when encoding happens, I'd like a second opinion on the currently chosen implementation.

If this is the correct way to go, then additional tests need to be added to safeguard that things works correctly when a different encoding is used.
If the encoding only happens for UTF-8, the implementation can be simplified.

Update: the current implementation is correct and a `@todo` note has been added to add more tests with different encodings during a next iteration on these tests.

Refs:
* https://www.php.net/manual/en/migration56.deprecated.php#migration56.deprecated.iconv-mbstring-encoding
* https://php-legacy-docs.zend.com/manual/php5/en/ini.core#ini.default-charset
2021-07-13 05:49:19 +02:00
Marcus Bointon 7cc67dd1dc
Merge pull request #2450 from jrfnl/feature/tests-reorganize-33
Tests: move (get|set|clear)ReplyTo tests to own file
2021-07-12 22:35:14 +02:00
jrfnl 2723a83d32 MailTransportTest: remove reply-to addressing testing
As noted in 2380, the addressing tests do not belong in the mail transport tests and as the `ReplyToGetSetClearTest` now covers this extensively, the assertions can be removed from the `MailTransportTest`.
2021-07-12 22:15:24 +02:00
jrfnl 4fa30cd710 ReplyToGetSetClearTest: add new test to verify clearing of reply-tos 2021-07-12 22:15:22 +02:00
jrfnl 35e76a2fa8 ReplyToGetSetClearTest: improve "extensions not available" test
The "fakefunctions" are all nice and dandy to get past the `idnSupported()` check, but if either of these functions is not _really_ available, the actual behaviour of the `PHPMailer::addReplyTo()` function is to _fail_ (on the address validation call in `PHPMailer::addAnAddress()`) and return `false`.

In other words, this test was nonsensical as it tested for something which can, and should, never happen.

With this in mind, the test has been rewritten to reflect the *real* behaviour when either Mbstring or the `idn_to_ascii` function is not available.
2021-07-12 22:15:19 +02:00
jrfnl 535f6338a9 ReplyToGetSetClearTest: improve the test with duplicate IDN addresses
This commit:
* Renames the `testDuplicateIDNRemoved()` method to `testNoDuplicateReplyToAddresses()`.
* Removes the call to `clearReplyTos()` at the start of the function as it is redundant. Each test gets a fresh instance of the PHPMailer class.
* Adds a number of additional assertions to the method to test the enqueuing and duplication removal in more depth.
* Ensures that all assertions are accompanied by a "failure" message so it can more easily be determined which assertion failed (in case of failure).

Includes adding `@covers` tags for the test.
2021-07-12 22:15:17 +02:00
jrfnl 06244ad942 ReplyToGetSetClearTest: improve the conversion and enqueuing test
This commit:
* Renames the `testConvertEncoding()` method to `testEnqueueAndAddIdnAddress()`.
* Removes the call to `clearReplyTos()` at the start of the function as it is redundant. Each test gets a fresh instance of the PHPMailer class.
* Adds a number of additional assertions to the method to test the enqueuing in more depth.

Includes adding `@covers` tags for the test.
2021-07-12 22:15:16 +02:00
jrfnl 465a067017 ReplyToGetSetClearTest::testReplyToInMessageHeader(): add additional test cases
... to test that the header gets set correctly when multiple reply-to addresses have been set, as well as when a reply-to address has been set without a name.
2021-07-12 22:15:08 +02:00
jrfnl faf8d9fadf ReplyToGetSetClearTest: test the reply-to message header gets set correctly
This commit:
* Renames the `testLowPriority()` method to `testReplyToInMessageHeader()`.
    This test method was originally basically testing two things: the priority and the reply to header being set. For this class, it now just focusses on the reply to header, so letting the name reflect that.
* Enhances the test by actually testing that the reply-to header is correctly found in the fully composed message.
* Breaks out the test case to a data provider to allow for adding additional test cases more easily.
2021-07-12 22:15:07 +02:00
jrfnl 5396226be7 ReplyToGetSetClearTest: add extra setting failure test
... to test that passing an invalid email address in combination with an instance of the `PHPMailer` class which was instantiated with `$exceptions = true` results in an exception.

Includes adding `@covers` tags for this specific method.
2021-07-12 22:15:06 +02:00
jrfnl e27f649456 ReplyToGetSetClearTest::testAddReplyToInvalidAddressNonIDN(): add additional test case
... which should be handled correctly based on the code.
2021-07-12 22:15:04 +02:00
jrfnl ce91079a56 ReplyToGetSetClearTest::testAddReplyToValidAddressNonIdn(): add additional test cases
This commit:
* Adds two extra test cases.
* Adds handling to allow the "expected" registered values (and key) being different from the original input values.
2021-07-12 22:15:02 +02:00
jrfnl 6ba19a260f ReplyToGetSetClearTest: test the setting of reply-to address in more depth
This commit:
* Splits the primary tests previously contained in the `testAddressing()` method into two distinct test methods, each using a data provider to allow for adding additional test cases more easily.
* Enhances the tests by not only testing the return value of the `addReplyTo()` method, but also verifying that the `ReplyTo property has been set correctly and contains the expected information.

Includes adding `@covers` tags for these specific methods.
2021-07-12 22:15:01 +02:00
jrfnl badac1cb8e ReplyToGetSetClearTest: replace testSkipping with `@requires` 2021-07-12 22:14:59 +02:00
jrfnl 6ab33cf975 ReplyToGetSetClearTest: switch to preSend()
The actual "dequeueing" and adding of `ReplyTo` addresses with IDNs happens within `preSend()`, so this test doesn't actually need to call `send()`.
2021-07-12 22:14:58 +02:00
jrfnl 51ce7d54b3 Tests/reorganize: move (get|set|clear)ReplyTo tests to own file
Note: this doesn't move the complete tests from the original test file, just select parts of the test methods.
2021-07-12 22:14:56 +02:00
Marcus Bointon f5f7f10e59
Merge pull request #2445 from jrfnl/feature/tests-reorganize-32
Tests: move property setting tests to own file
2021-07-12 21:27:45 +02:00
Marcus Bointon d16053c51c
Merge pull request #2440 from jrfnl/feature/parseaddresses-bug-fix-1-missing-extension-check
PHPMailer::parseAddresses(): bug fix [1] - extension availability not checked (consistently)
2021-07-12 21:26:26 +02:00
Marcus Bointon 7d57e6c078
Merge pull request #2446 from eltociear/patch-1
EncodeQTest: fix typo
2021-07-12 16:51:04 +02:00
Ikko Ashimine 4c1adf79f3
EncodeQTest: fix typo
containg -> contains
2021-07-12 23:10:59 +09:00
jrfnl 63da073183 SetTest: add `@covers` tag 2021-07-12 15:24:18 +02:00
jrfnl 8fe8b5634c SetTest::testSetValidProperty(): add additional test case
This commit:
* Adds one extra test case.
* Documents why there is no test case for a `private` property.
2021-07-12 15:24:16 +02:00
jrfnl 3d9a99802a SetTest: reorganize success test to use a data provider
* Renames the method to a more descriptive name.
* Maintains the same test case.
* Makes it easier to add additional test cases in the future.
2021-07-12 15:24:14 +02:00
jrfnl 628d56927e SetTest: split off value toggling test
This commit moves the "set a property to null and then back" test to a separate test method.

Note: based on the code in the method, this test doesn't really add any value, but I also see no reason to remove it.
2021-07-12 15:24:12 +02:00
jrfnl eef6f4e52a SetTest: split off failure test
This commit moves the "failed to set the property" test case to a separate test method.
2021-07-12 15:24:10 +02:00
jrfnl d4ff9fdd54 Tests/reorganize: move property setting tests to own file 2021-07-12 15:24:08 +02:00
jrfnl 1e874999d1 PHPMailer::parseAddresses(): replace use of extension_loaded
The `extension_loaded()` PHP function is sometimes disabled by shared hosts as a form of "security by obscurity".
This would lead to a fatal "Function not available" error.

With that in mind, replacing the `extension_loaded()` checks in the `PHPMailer::parseAddresses()` function with a check for the `MB_CASE_UPPER` constant being defined. This _should_ be reliable enough to determine whether the Mbstring extension is available, though has its own drawbacks as when the extension is not available, the constant _could_ be polyfilled by userland code (and sometimes is).

The `MB_CASE_UPPER` constant was chosen as it is one of the few Mbstring constants which is actually available cross-version in PHP 5.5-current.

Refs:
* https://www.php.net/manual/en/mbstring.constants.php
* https://php-legacy-docs.zend.com/manual/php5/en/mbstring.constants
2021-07-12 15:20:28 +02:00
Marcus Bointon 1265af38ea
Merge pull request #2444 from jrfnl/feature/tests-reorganize-31
Tests: move setFrom tests to own file
2021-07-12 15:14:08 +02:00
jrfnl 64312a5eed SetFromTest: add `@covers` tag 2021-07-12 14:56:38 +02:00
jrfnl 2410465e9c SetFromTest: add extra test for passing an unacceptable email address 2021-07-12 14:56:37 +02:00
jrfnl 74e3d8e8f4 SetFromTest::testSetFromFail(): add additional test cases
... which should be handled correctly based on the code in the method under test.
2021-07-12 14:56:35 +02:00
jrfnl c6bfd49b8b SetFromTest: add extra failure test
... to test that passing an invalid email address in combination with an instance of the `PHPMailer` class which was instantiated with `$exceptions = true` results in an exception.

Includes reworking the `testSetFromFail()` method to a data provider and letting both the `testSetFromFail()` and the new `testInvalidAddressException()` method use the same data provider.
2021-07-12 14:56:34 +02:00
jrfnl 5e912a792d SetFromTest: improve the testSetFromFail() test
Make the failure test more comprehensive by verifying that when the method fails, the values for the `From`, `FromName` and `Sender` properties, _really_ haven't changed.
2021-07-12 14:56:32 +02:00
jrfnl 76e14b34be SetFromTest: add new test for not overruling existing Sender
Based on the code in the method, any existing, previously set `Sender` should not be overruled, even when the `$auto` parameter is set to `true`.

This method tests that specific situation.
2021-07-12 14:56:31 +02:00
jrfnl baee96b604 SetFromTest::testSetFromSuccess(): add additional test cases
... which should be handled correctly based on the code in the method under test.
2021-07-12 14:56:29 +02:00
jrfnl 97f82e5993 SetFromTest: replaces the last of the `testAddressing()` method
... with a dedicated test to verify that the `Sender` is not overruled when the `$auto` parameter is set to `false`.
2021-07-12 14:56:27 +02:00
jrfnl d7cf5c6de7 SetFromTest: reorganize success tests to use data providers
* Merges the two "success" tests from the `testAddressing()` and the `testAddressing2()` methods into one `testSetFromSuccess()` method.
* Adds additional assertions to more comprehensively verify that the method did what was expected, i.e. set the `From`, `FromName` and `Sender` properties.
* Maintains the same test cases.
* Makes it easier to add additional test cases in the future.
2021-07-12 14:56:25 +02:00
jrfnl 23f0238eed SetFromTest: split off failure test
This commit moves the "invalid email address" test case to a separate test method.
2021-07-12 14:56:24 +02:00
jrfnl 4988ca1927 Tests/reorganize: move setFrom tests to own file 2021-07-12 14:56:22 +02:00
Marcus Bointon 76767b4de1
Merge pull request #2443 from jrfnl/feature/tests-reorganize-30
Tests: move error recording test to own file
2021-07-12 14:31:51 +02:00
jrfnl 214c415266 SetErrorTest: add `@covers` tags 2021-07-12 13:58:19 +02:00
jrfnl 058ded57b8 SetErrorTest: add additional tests for the `PHPMailer::setError()` and `PHPMailer::isError()` methods
So far, these methods were only tested in the most perfunctory manner.

The additional tests this commit introduces, test all aspects of the methods as well as documents the current behaviour of the methods.

Take note of the "text merging"/readability issues for the SMTP error messages. There may be room for improvement there.
2021-07-12 13:58:10 +02:00
jrfnl caa1d15eec SetErrorTest: replace the original test
... by a much simpler test which effectively tests the same thing, i.e.:
* No errors to start with.
* Trigger an error.
* Verify that `PHPMailer::isError()` returns `true`.
* Verify that the error message is as expected.
2021-07-12 13:58:08 +02:00
jrfnl 2c570af805 Tests/reorganize: move error recording test to own file 2021-07-12 13:57:56 +02:00
Marcus Bointon 56e7d2a0fd
Merge pull request #2439 from jrfnl/feature/tests-reorganize-29
Tests: move encodeQ tests to own file
2021-07-12 08:45:40 +02:00
jrfnl 5cbd8f9f62 ParseAddressesTest: add additional test for when Mbstring is not available
What with the previous commit adding a requirement for the `Mbstring` extension to the existing tests, it becomes clear that the "Mbstring extension not available" code path was not covered by the tests.

This commit fixes that by:
* Adding two new test methods which explicitly expect the Mbstring extension to **not** be available.
* Changing the data provider "expected(Imap)" keys.
    The `expected` key in the array will now be an array of arrays.
    A `default` key can be used for when the output across configurations will be the same.
    Any differences across configurations can be provided in separate sub-keys of the `expected` array, using the `native+mbstring`, `imap+mbstring`, `native--mbstring` and/or `imap--mbstring` keys, which match the four test methods which are now in place.
    Additionally, an `native` and/or `imap` key can be used for setting the output expectations for the two native implementation or the two IMAP implementation tests, if the Mbstring extension makes no difference.
2021-07-11 18:30:59 +02:00
jrfnl 8827c9b3ce PHPMailer::parseAddresses(): bug fix [1] - extension availability not checked
Follow up to #2266

Bug fix

In both "arms" (imap vs native implementation) of the `PHPMailer::parseAddresses()` method, the `mb_decode_mimeheader()` function is used to decoded a (utf-8) encoded name.

In the IMAP "arm", a check was in place for the Mbstring extension being available before using it. This check was missing from the "native implementation" "arm".

Existing Tests

This also means that both currently existing tests have a requirement for the MbString extension being available. This was previously not made explicit in the tests.
Fixed now.
2021-07-11 18:30:57 +02:00
jrfnl 8fd56f335e ParseAddressesTest: split off expectation verification 2021-07-11 18:30:56 +02:00
jrfnl e67ed991e3 ParseAddressesTest: minor correction to test case description 2021-07-11 18:30:54 +02:00
jrfnl ca1f2cfea7 EncodeQTest: add `@covers` tag 2021-07-11 11:17:15 +02:00
jrfnl 3984ac2839 EncodeQTest: add additional test cases
... which should be handled correctly based on the code in the method under test.
2021-07-11 11:17:13 +02:00
jrfnl e6af3c80b4 EncodeQTest: reorganize to use data providers
* Maintains (largely) the same test code and exactly the same test cases.
* Makes it easier to add additional test cases in the future.
2021-07-11 11:17:11 +02:00
jrfnl 167c81a2cf Tests/reorganize: move encodeQ tests to own file 2021-07-11 11:17:08 +02:00
Marcus Bointon 904dc698ea
Merge pull request #2435 from jrfnl/feature/tests-reorganize-28
Tests: move encodeString tests to own file
2021-07-11 09:09:08 +02:00
Marcus Bointon ddb89f7239
Merge pull request #2436 from jrfnl/feature/2418-gettranslations-always-available
PHPmailer::getTranslations():  translations should always be available
2021-07-11 09:07:43 +02:00
jrfnl 123c0aac84 PHPmailer::getTranslations(): translations should always be available
If the language has not been set yet, it should return the English text strings.

Fixes 2419
2021-07-09 21:14:47 +02:00
jrfnl d003985774 HasLineLongerThanMaxTest: remove a `@covers` tag
As the `PHPMailer::encodeString()` method is now fully covered by dedicated tests, this `@covers` tag can be removed.
2021-07-09 21:13:21 +02:00
jrfnl 5a29b1916b EncodeStringTest: add extra test for passing an invalid encoding
... in combination with an instance of the `PHPMailer` class which was instantiated with `$exceptions = true`.
2021-07-09 21:13:20 +02:00
jrfnl 0d071ba5c0 EncodeStringTest: improve the testInvalidEncoding() test
* Ensure that the return value of the call to `PHPMailer::encodeString()` is an empty string.
* Ensure that the error count and info is correctly set.
2021-07-09 21:13:18 +02:00
jrfnl a00826debe EncodeStringTest: add additional test cases
... which should be handled correctly based on the code in the method under test.

With these additional test cases, the method now has 100% code coverage and is fully tested.
2021-07-09 21:13:17 +02:00
jrfnl fa43806486 EncodeStringTest: reorganize to use data providers
* Maintains the same test code and test cases.
* Makes it easier to add additional test cases in the future.

Includes adding `@covers` tag.
2021-07-09 21:13:15 +02:00
jrfnl d96d944631 EncodeStringTest: split off failure test
This commit moves the "incorrect encoding" test case to a separate test method.
2021-07-09 21:13:13 +02:00
jrfnl 2380a16f5e EncodeStringTest: fix incorrect assertion
Using a regex assertion with arbitrary input data which is not regex escaped, makes this test suspect.
From the looks of it, the test _should_ be testing that the output is the _same_, so let's use that assertion.
2021-07-09 21:13:11 +02:00
jrfnl 7c8d3f21b2 Tests/reorganize: move encodeString tests to own file
Note: this doesn't move the complete test from the original test file, just select parts of the test method.
2021-07-09 21:13:08 +02:00
Marcus Bointon 687521c5ff
Merge pull request #2428 from jrfnl/feature/localization-add-missing-text-strings
Localization: allow for more text strings to be translated
2021-07-09 18:43:41 +02:00
Marcus Bointon 5106624d2a
Merge pull request #2434 from jrfnl/feature/tests-reorganize-27
Tests: move addStringEmbeddedImage tests to own file
2021-07-09 16:54:47 +02:00
jrfnl 3fc3a2c7ca AddStringEmbeddedImageTest: add `@covers` tags 2021-07-09 15:08:27 +02:00
jrfnl 996136e978 AddStringEmbeddedImageTest: add additional "fail to attach" test method
This commit:
* Adds a new `testFailToAttach()` test method to test the behaviour of the `PHPMailer::AddStringEmbeddedImageTest()` method when the `PHPMailer` class has been instantiated with `$exceptions` disabled.
* This new test method uses the same data provider - introduced in the previous commit - as the `testFailToAttachException()` method.
2021-07-09 15:08:25 +02:00
jrfnl 70828f6dca AddStringEmbeddedImageTest: refactor the "fail to attach" test case
This commit:
* Renames the `testStringEmbeddedImageEncodingException()` test to `testFailToAttachException()`.
* Reworks the test to use a data provider.
* Adds testing of the exception message to the `testFailToAttachException()` method.
2021-07-09 15:08:24 +02:00
jrfnl 3efe0352f4 AddStringEmbeddedImageTest: improve original test [2]
This expands the assertions executed in this test to cover the code under test more comprehensively.
2021-07-09 15:08:22 +02:00
jrfnl cd3416bc2d AddStringEmbeddedImageTest: improve original test [1]
This commit:
* Improves the test name and the description in the docblock.
* Replace a redundant condition and "forced" failure assertion with an assertion actually testing the result of the method call.
* Removes the redundant `return` - if an assertion fails, the rest of the code within the test method will not be executed anyway.
* Minor inline comment tweaks.
2021-07-09 15:08:20 +02:00
jrfnl e416c949d8 AddStringEmbeddedImageTest: switch to preSend()
The actual "attaching" of the string attachment happens within `createBody()` which is called from `preSend()`, so this test doesn't actually need to call `send()`.
2021-07-09 15:08:19 +02:00
jrfnl 3645ec3e87 Tests/reorganize: move addStringEmbeddedImage tests to own file 2021-07-09 15:08:17 +02:00
jrfnl 683a5039d2 Translations: update the Dutch translation 2021-07-09 15:04:18 +02:00
jrfnl a550adc872 Localization: allow for more text strings to be translated
In a number of places in the code base I came across hard-code error messages, which were not set up to be translatable.

For those I found, I've now fixed this.

Note: I've not added the labels used for logging errors via the `PHPMailer:edebug()` method. If so desired, that could be added in a future iteration.

Existing translation files have not been updated. Translators may need to be pinged before the next release to update the translation(s) they maintain.

Includes a minor tweak to the PHPCS configuration to allow lines in language files to exceed the "120 chars line max" as using concatenation for text strings in translation files will not work with the current way of loading these files and the new "buggy PHP" message is a long text which would result in nearly all translation files throwing the warning.
2021-07-09 15:01:11 +02:00
Marcus Bointon 1a2e462b9d
Merge pull request #2431 from jrfnl/feature/tests-add-tests-fileisaccessible
Tests: introduce dedicated tests for the `PHPMailer::fileIsAccessible()` method
2021-07-09 11:39:25 +02:00
Marcus Bointon fbf2eea0e9
Merge pull request #2430 from jrfnl/feature/tests-add-tests-ispermittedpath
Tests: introduce dedicated tests for the `PHPMailer::isPermittedPath()` method
2021-07-09 11:38:37 +02:00
Marcus Bointon 971af16ccf
Merge pull request #2427 from jrfnl/feature/tests-reorganize-26
Tests: move addStringAttachment tests to own file
2021-07-09 11:37:27 +02:00
jrfnl 49bcd4a035 Tests: introduce dedicated tests for the `PHPMailer::fileIsAccessible()` method
So far, this method did not have dedicated tests.

The test file this commit introduces, tests nearly all aspects of the method as well as documents the current behaviour of the method.

There is one particular test case missing. This is annotated in the class docblock.

While this method is quite simple, testing it separately means that the tests for methods _using_ this method don't have to _also_ test the functioning of this method, which means they can be more focussed on their own logic.
2021-07-09 09:36:36 +02:00
jrfnl f5b54c2bb5 Tests: introduce dedicated tests for the `PHPMailer::isPermittedPath()` method
So far, this method did not have dedicated tests.

The test file this commit introduces, tests all aspects of the method as well as documents the current behaviour of the method.

While this method is quite simple, testing it separately means that the tests for methods _using_ this method don't have to _also_ test the functioning of this method, which means they can be more focussed on their own logic.
2021-07-09 09:30:39 +02:00
jrfnl 59f82c7db5 AddStringAttachmentTest: add `@covers` tags 2021-07-08 11:37:17 +02:00
jrfnl 404ba09b64 AddStringAttachmentTest: add additional "fail to attach" test method
This commit:
* Adds a new `testFailToAttach()` test method to test the behaviour of the `PHPMailer::addStringAttachment()` method when the `PHPMailer` class has been instantiated with `$exceptions` disabled.
* This new test method uses the same data provider - introduced in the previous commit - as the `testFailToAttachException()` method.
2021-07-08 11:37:15 +02:00
jrfnl 384e291092 AddStringAttachmentTest: refactor the "fail to attach" test case
This commit:
* Renames the `testStringAttachmentEncodingException()` test to `testFailToAttachException()`.
* Reworks the test to use a data provider.
* Adds testing of the exception message to the `testFailToAttachException()` method.
2021-07-08 11:37:13 +02:00
jrfnl 40a4fa39b7 AddStringAttachmentTest: improve original test
This expands the assertions executed in this test to cover the code under test more comprehensively.
2021-07-08 11:37:12 +02:00
jrfnl 41af61ab2f AddStringAttachmentTest: switch to preSend()
The actual "attaching" of the string attachment happens within `createBody()` which is called from `preSend()`, so this test doesn't actually need to call `send()`.
2021-07-08 11:37:10 +02:00
jrfnl 0bc3dfb96b Tests/reorganize: move addStringAttachment tests to own file 2021-07-08 11:37:08 +02:00
Marcus Bointon e93f027b1f
Merge pull request #2425 from jrfnl/feature/tests-reorganize-25
Tests: move addEmbeddedImage tests to own file
2021-07-08 10:56:11 +02:00
jrfnl 73b4ec5bea AddEmbeddedImageTest: add `@covers` tags 2021-07-07 19:27:02 +02:00
jrfnl 90c98c3c1c AddEmbeddedImageTest: fully test exceptions for "fail to attach" test cases
This commit:
* Adds an `exceptionMessage` index to the `dataFailToAttach()` data provider.
* Renames the `testEmbeddedImageEncodingException()` method to `testFailToAttachException()`.
* Sets the `testFailToAttachException()` method up to use the `dataFailToAttach()` data provider.
* Adds testing of the exception message to the `testFailToAttachException()` method.

With this change, the "fail to attach" test cases are now fully tested for both a `PHPMailer` instance without exceptions enabled, as well as for an instance _with_ exceptions enabled.
2021-07-07 19:27:01 +02:00
jrfnl eb666a7e5d AddEmbeddedImageTest: add extra test case for `testFailToAttach()` method
... mirroring the same test in the `testEmbeddedImageEncodingException()` method.
2021-07-07 19:26:59 +02:00
jrfnl 028b503624 AddEmbeddedImageTest: improve original test [2]
This expands the assertions executed in this test to cover the code under test more comprehensively.
2021-07-07 19:26:58 +02:00
jrfnl cbecbc956b AddEmbeddedImageTest: improve original test [1]
The test code remaining in the `testEmbeddedImage()` constitutes one test.

This commit:
* Renames the test method and improves the description in the docblock.
* Removes the redundant call to `PHPMailer::clearAttachments()`.
    This call was previously needed as multiple situations were being tested in one test method.
    Now each test case has its own test method, the call to `PHPMailer::clearAttachments()` is no longer needed as each test method will receive a fresh, clean instance of the `PHPMailer` class.
* Replace a redundant condition and "forced" failure assertion with an assertion actually testing the result of the method call.
* Removes the redundant `return` - if an assertion fails, the rest of the code within the test method will not be executed anyway.
2021-07-07 19:26:56 +02:00
jrfnl d034bef136 AddEmbeddedImageTest: split off "missing name" test
The test case when a file was attached without explicitly adding a filename wasn't actually being tested at all as no assertion was used.

This commit:
* Moves that particular test case to a separate test method.
* Adds relevant assertions to actually test the test case.
2021-07-07 19:26:54 +02:00
jrfnl e5b07ba3c3 AddEmbeddedImageTest: split off failure test
The "failure" case when a non-existent file was being passed, wasn't actually being tested at all as no assertion was used.

This commit:
* Moves the particular failure test case to a separate test method with a data provider (to allow for more failure test cases to be added).
* Uses an assertion on the call to `addEmbeddedImage()` to actually test that the method return a failure state.
* Verifies that no attachment for an inline image was added by adding a second assertion with a call to `PHPMailer::inlineImageExists()`.
2021-07-07 19:26:53 +02:00
jrfnl a866bc9eda AddEmbeddedImageTest: switch to preSend()
The actual "attaching" of the images happens within `createBody()` which is called from `preSend()`, so this test doesn't actually need to call `send()`.
2021-07-07 19:26:51 +02:00
jrfnl 8e76e48afb Tests/reorganize: move addEmbeddedImage tests to own file
Note: this doesn't move the complete test from the original test file, just select parts of the test method.
2021-07-07 19:26:49 +02:00
Marcus Bointon 58b875bfed
Merge pull request #2424 from jrfnl/feature/tests-reorganize-24
Tests: move custom header tests to own file
2021-07-07 18:51:08 +02:00
jrfnl da01dc50e0 CustomHeaderTest: add `@covers` tags 2021-07-07 17:42:47 +02:00
jrfnl 611c58c134 CustomHeaderTest: add extra test cases for `testAddCustomHeaderInvalid()` method 2021-07-07 17:42:45 +02:00
jrfnl 07be3bc7ff CustomHeaderTest: add extra test cases for `testAddAndGetCustomHeader()` method 2021-07-07 17:42:43 +02:00
jrfnl d2a1a20097 CustomHeaderTest: reorganize rest to use data provider
* Maintains (largely) the same test cases.
* Prevent one failing assertion hiding a potential second failure.
* Makes it easier to add additional test cases in the future.

Note:
This removes the intermittent calls to `clearCustomHeaders()` from this test. This is now tested via a separate method and as each test case will receive a fresh instance of the `PHPMailer` class, there is no need to clear the set custom headers between tests.
2021-07-07 17:42:41 +02:00
jrfnl fb81ccc224 CustomHeaderTest: add dedicated test for `clearCustomHeaders()` method
Includes adding an assertion to ensure that the `PHPMailer::CustomHeader` property is still in array format after clearing it out.
2021-07-07 17:42:40 +02:00
jrfnl a7d9416e24 CustomHeaderTest: move "failure" tests to own method with data provider 2021-07-07 17:42:38 +02:00
jrfnl 22ba72fd99 CustomHeaderTest: rename exception test and improve
... by also testing that the exception message matches the expected message.
2021-07-07 17:42:36 +02:00
jrfnl ce0c31cea7 Tests/reorganize: move custom header tests to own file 2021-07-07 17:42:34 +02:00
Marcus Bointon 2aa2614e5d
Merge pull request #2423 from jrfnl/feature/tests-haslinelongerthan-switch-to-presend
HasLineLongerThanMaxTest: switch to preSend()
2021-07-07 17:26:23 +02:00
Marcus Bointon 7475270380
Merge pull request #2422 from jrfnl/feature/tests-reorganize-23
Tests: move setWordWrap tests to own file
2021-07-07 17:25:54 +02:00
jrfnl 6e0193958d HasLineLongerThanMaxTest: switch to preSend()
The line length adjustments are executed within `createBody()` which is called from `preSend()`, so this test doesn't actually need to call `send()`.

I also wonder if this test can be further improved by having more targeted tests for `PHPMailer::hasLineLongerThanMax()` and whether these more extensive tests can be included in a test class which is more targeted at the `createBody()` and/or `preSend()` methods, but that is for later.
2021-07-07 17:12:16 +02:00
jrfnl 54c0bb9fb5 SetWordWrapTest: add `@covers` tags 2021-07-07 17:11:43 +02:00
jrfnl bb8b66d0c9 SetWordWrapTest: add "no-wrapping" test
... to increase code coverage.
2021-07-07 17:11:41 +02:00
jrfnl 2c7a354857 SetWordWrapTest: actually test the wordwrapping has been applied
Previously, the test didn't actually test whether the wordwrapping had been applied, just that the message was (pre)send successfully.

Changing the assertions to actually test that the wordwrapping has been correctly applied.
2021-07-07 17:11:39 +02:00
jrfnl 42ddb107f2 SetWordWrapTest: make `$WordWrap` variable
Make the `WordWrap` setting variable and provide it via the data provider.
2021-07-07 17:11:37 +02:00
jrfnl 807a80b4a6 SetWordWrapTest: reorganize to use data providers
* Maintains the same test code and test cases.
* Removes code duplication.
* Makes it easier to add additional test cases in the future.
2021-07-07 17:11:35 +02:00
jrfnl c6ed8ad0eb SetWordWrapTest: use `preSend()` not `send()`
For this test, there is no need to actually try to _send_ the message, we just need to make sure that `setWordWrap()` is triggered, which can be done by calling `preSend()` instead of `send()`.
2021-07-07 17:11:33 +02:00
jrfnl b4ab241395 Tests/reorganize: move setWordWrap tests to own file 2021-07-07 17:11:31 +02:00
Marcus Bointon 55ad6349c9
Merge pull request #2421 from jrfnl/feature/tests-reorganize-22
Tests: move puny encoding test to own file
2021-07-07 15:35:24 +02:00
Marcus Bointon a44e3db8d9
Merge pull request #2420 from jrfnl/feature/gitattributes-ignore-codecov-config
.gitattributes: export-ignore code coverage config file
2021-07-07 15:33:33 +02:00
Marcus Bointon fbc5834fc5
Merge pull request #2417 from jrfnl/feature/utf8boundary-test-minor-improvement
Utf8CharBoundaryTest: switch base test case
2021-07-07 15:33:20 +02:00
Marcus Bointon 86aae5c547
Merge pull request #2416 from jrfnl/feature/tests-setup-vs-test-bootstrap
SendTestCase: error out when the testbootstrap file cannot be found
2021-07-07 15:32:53 +02:00
Marcus Bointon a6aa3c8e12
Merge pull request #2415 from jrfnl/feature/tests-add-tests-generateID
Tests: introduce dedicated test for the `PHPMailer::generateID()` method
2021-07-07 15:32:07 +02:00
jrfnl 89af7c5074 PunyencodeAddressTest: add `@covers` tag 2021-07-07 05:15:27 +02:00
jrfnl 09ba11ae08 PunyencodeAddressTest: add additional test method
This new test method covers a range of cases where the `PHPMailer::punyencodeAddress()` method should (and does) return the original input value unchanged.

This test does not require the `mbstring` extension or `idn_to_ascii()` function to be available, which is why it has been set up as a separate test with a separate data provider.
2021-07-07 05:15:24 +02:00
jrfnl 7f6c882395 PunyencodeAddressTest: add additional test case
... to ensure that the `PHPMailer::punyencodeAddress()` only acts on the domain.
2021-07-07 05:15:23 +02:00
jrfnl acb038dac3 PunyencodeAddressTest: reorganize to use data provider
* Maintains the same test code and test cases.
* Makes it easier to add additional test cases in the future.
2021-07-07 05:15:21 +02:00
jrfnl cd563f1e99 PunyencodeAddressTest: set proper run requirements
The "fakefunctions" are all nice and dandy to get past the `idnSupported()` check, but if either of these functions is not _really_ available and therefore doesn't behave as expected, the test would still fail as the expected output of the `PHPMailer::punyencodeAddress()` function would not match.

In other words, this test should not use the `fakefunctions`, but should have a hard requirement for the `mbstring` extension (for the `mb_check_encoding()` and the `mb_convert_encoding()` function calls) and a check for the `idn_to_ascii()` function.
2021-07-07 05:15:20 +02:00
jrfnl 3a62fe304b Tests/reorganize: move puny encoding test to own file 2021-07-07 05:15:18 +02:00
jrfnl a01cc9ba82 .gitattributes: export-ignore code coverage config file
Follow up on 2407.
2021-07-07 05:01:23 +02:00
Marcus Bointon 6dc419aead
Merge pull request #2414 from jrfnl/feature/tests-reorganize-21
Tests: move denial of service tests to own file
2021-07-06 21:49:33 +02:00
jrfnl 8e8fdbf5cb Utf8CharBoundaryTest: switch base test case
Follow up on 2389 and 2412

Now the base `TestCase` has been simplified and only presets the bare minimum of properties in the `PHPMailer` class, the `Utf8CharBoundaryTest` can actually use it.
2021-07-06 21:41:35 +02:00
jrfnl ef35c0daa5 SendTestCase: error out when the testbootstrap file cannot be found
The `PHPMailerTest` class contained a `testBootstrap()` method to verify that the `testbootstrap.php` file exists as the first test in the class.
As the order in which tests are run is not predefined, this is not reliable.

Additionally, the check for the `testbootstrap.php` file is checking a pre-requisite for tests using the `PHPMailer::send()` method, so it would be better to verify via a condition in the `set_up()`.

Now, using such a condition, there is choice: the test can either be marked as "skipped" when the `testbootstrap.php` file can not be found, or be marked as an "error".

As the tests _should_ run, skipping them would hide an error in the dev-user test setup, so showing these tests as errors seems more appropriate.

To that end, the `testBootstrap()` method has been removed and a check for the `testbootstrap.php` file has been added to the `SendTestCase::set_up()` which will now throw an appropriate `Exception` when the file is not found.

Oops... also removes a stray `parent::set_up()` at the start of the local `set_up()` which should have been removed in 218fd13c88
2021-07-06 21:39:41 +02:00
jrfnl 63e9bf5604 Tests: introduce dedicated test for the `PHPMailer::generateID()` method
Note: as the `PHPMailer::generateID()` method is `protected`, a round-about way of testing this is needed, but this test does verify the functioning of the method.

Take note of the notes in the test docblock - the GH Actions scripts running CI, should make sure that each of these scenarios is encountered/tested.
This will be addressed in a separate PR at the end of this round of test changes.
2021-07-06 21:37:29 +02:00
jrfnl eb6dca5521 SecurityDenialOfServiceVectorsTest: various test tweaks
Minor test tweaks:
* Add `@coversNothing` tag.
* Rename the first test (add a number).
* Use `@link` instead of `@see` for links.
* Minor comment punctuation.
2021-07-06 21:28:02 +02:00
jrfnl 6b95da3e65 Tests/reorganize: move denial of service tests to own file 2021-07-06 21:28:00 +02:00
Marcus Bointon e372a5e85b
Merge pull request #2412 from jrfnl/feature/tests-split-and-improve-testcase
Tests: split `TestCase` class into three base test case classes and make more flexible
2021-07-06 20:17:43 +02:00
Marcus Bointon 336b6976b6
Merge pull request #2410 from jrfnl/feature/tests-reorganize-20
Tests: move host validation tests to own file
2021-07-06 20:16:47 +02:00
jrfnl 55c54e46b0 TestCase::checkChanges(): make dynamic
The `TestCase::checkChanges()` method is a way of exposing what properties in the `PHPMailer` class have a changed value compared to their default value in a particular test situation. The method is used for debugging tests.

As things were, the `TestCase::checkChanges()` method would check against a limited set of hard-coded values to determine whether the default value of a property has been updated.

This is unstable as:
1. Default values may change in the `PHPMailer` class and the values within this method would need to be updated to match, which is easily forgotten.
2. New properties may be introduced in the `PHPMailer` class and be relevant to this debug changelog.
    Again, it would require manually adding these new properties to this method to start tracking them.
3. Property values may be changed in the `set_up()` method, which would be a "known change" for a certain test.
    In part such "expected" changes were taken into account in this method based on the previously hard-coded setting changes in `set_up()`.
    With the logic for the property setting from the `set_up()` method now being more flexible, the pre-setting of properties having been reduced to the bare minimum, but also allowing individual test clases to set their own additional changes, keeping track of what is a "known" change by checking against hard-coded values is no longer stable.

With this in mind, I propose to make the `TestCase::checkChanges()` method dynamic.

To that end, this commit:
* Retrieves the default values of all properties of the `PHPMailer` class via the PHP native `get_class_vars()` function.
* Will automatically check for changes in *all* properties, with only a limited set of _exclusions_, effectively changing the changelog from an "inclusion list" to an "exclusion list".
    A select list of properties is excluded from being listed in the changelog via the `TestCase::$changelogExclude` property.
    See the inline documentation in the property for the reasoning behind excluding certain properties from the changelog.
* The value of static properties will always be compared to their default value as registered in the `TestCase::$PHPMailerStaticProps` method and will be listed when different.
    _Note: as documented, this list has to be hard-coded due to Reflection (as well as `get_class_vars()`) not handling default values for static properties correctly._
* The value of non-static properties will be compared to both the known changes made in the `set_up()` method and if the property was not changed in `set_up()`, to their default value. The property will be listed in the changelog when the value is different from the "expected" value, i.e. not a known change from `set_up()` and not the default value.

In addition to this, the representation of the properties will now be created via `var_export()`, which allows for listing `null` and boolean values as well.
2021-07-06 20:05:35 +02:00
jrfnl 218fd13c88 SendTestCase: implement use of the `$propertyChanges` property
The `SendTestCase` gets the values of the properties to be set from the `testbootstrap.php` file.

This introduces a `private` property to map the field names used in `$_REQUEST` to the properties in the `PHPMailer` class and adds logic to the overloaded `set_up()` method to fill the `$propertyChanges` TestCase property. The actual setting of the properties in the `PHPMailer` instance is deferred to the underlying `TestCase` parent class.

Includes adding support for presetting the `bcc` value for feature completeness.

Overloading and/or adding to the `$propertyChanges` array from concrete test cases is, of course, supported, so if individual tests need additional presetting of properties, the same logic as mentioned in the previous commit can be used.
2021-07-06 20:05:35 +02:00
jrfnl f9ce138ff7 PreSendTestCase: reduce amount of properties being preset
After some investigation, it turns out that barely any of these properties are actually needed for the `PHPMailer::preSend()` method to succeed.

This commit removes all presetting of properties for the PHPMailer instance created by the `PreSendTestCase`, save for the bare minimum.

Overloading and/or adding to the `$propertyChanges` array from concrete test cases is, of course, supported, so if individual tests need additional presetting of properties, the same logic as mentioned in the previous commit can be used.
2021-07-06 20:05:35 +02:00
jrfnl f4bb4d7b63 PreSendTestCase: implement use of the `$propertyChanges` property 2021-07-06 20:05:35 +02:00
jrfnl 5620c873d9 TestCase: make the property pre-setting more flexible
This commit makes the property setting in the `TestCase::set_up()` more flexible by combining an overloadable property `$propertyChanges` and a `foreach` loop to set the actual property values.

Concrete test classes can either overload the `$propertyChanges` property with their own version or can add to the default setup using the following pattern:
```php
protected function set_up()
{
    $this->propertyChanges['additional_key'] = 'value';
    // Add more properties...

    parent::set_up();
}
```
2021-07-06 20:05:35 +02:00
jrfnl d7b048cf64 TestCase: split into three different `TestCase`s
The `TestCase::set_up()` was setting quite a number of properties in the `PHPMailer` class.

This makes testing more difficult for the following reasons:
1. The tests can no longer presume the properties in the `PHPMailer` class will have their default values
    This means that tests are not "transparent" (clearly show what is being tested), nor isolated (only target what is specifically being tested).
2. Any changes to the values set in the `set_up()` method may have a ripple effect and create a need for individual test expectations to be adjusted.
3. As the `set_up()` is changing a number of the properties using methods in the `PHPMailer()` class and methods called during the `set_up()` are included in code coverage visualizations, code coverage cannot fully be trusted and it is more difficult to verify that each piece of code has tests covering that code path.

With this in mind, I'm proposing splitting the `TestCase` into three distinct abstract `TestCase`s:
* A basic `TestCase` containing the utility methods and a minimal `set_up()` and `tear_down()`.
* A `PreSendTestCase` for use with tests using the `preSend()` method which requires a few properties to be set.
* A `SendTestCase` for use with tests actually testing the sending of mail using the `send()` method, which needs yet more properties and uses the `testbootstrap.php` file to retrieve the values of those variables.

This commit executes the initial split. Follow-on commits will streamline this further.

Includes adjusting the `TestCase` being extended for select existing unit test classes.
2021-07-06 20:05:35 +02:00
Marcus Bointon ea8bd9373a
Merge pull request #2413 from jrfnl/feature/ghactions-retry-postfix-install-on-fail
GH Actions: automatically retry postfix install on failure
2021-07-06 20:03:19 +02:00
jrfnl 5aa58f8c49 PHPMailer::isValidHost: minor regex tweak
A `]` is a special character in a regex and should be escaped when the literal is intended. While it was not problematic in this case, it is still recommended to escape it.
2021-07-06 20:02:42 +02:00
jrfnl ca11260085 IsValidHostTest: add `@covers` tags 2021-07-06 20:02:42 +02:00
jrfnl e2dec4508c IsValidHostTest: add additional test cases
... which should be handled correctly based on the code in the method under test.

With these additional test cases, the method now has 100% code coverage and is actually tested quite fully.
2021-07-06 20:02:37 +02:00
jrfnl 79d7cc0757 IsValidHostTest: minor reordering of data provider
... for easier scanning what's covered reading.
2021-07-06 19:59:49 +02:00
jrfnl 9291bf2db8 IsValidHostTest: reorganize to use data providers
* Split the test into two tests with each a dedicated data provider
* Maintains the same test code and test cases.
* Makes it easier to add additional test cases in the future.

**Note**: the data set description may need some improvement, I've described them based on my best guess of what they were testing.
2021-07-06 19:59:49 +02:00
jrfnl aa36b51cf3 Tests/reorganize: move host validation tests to own file
As this test does not actually need an instantiated PHPMailer object, this class extends the `Yoast\PHPUnitPolyfills\TestCases\TestCase` instead of the `PHPMailer\Test\TestCase`.
2021-07-06 19:59:49 +02:00
jrfnl 44d195a060 GH Actions: automatically retry postfix install on failure
The postfix installation step fails regularly, resulting in failed CI builds which have to be restarted, while the failure is not due to anything in the PR.

This commit introduces a new action runner for the postfix install, which will automatically retry the install up to 3 times.

If it works as I expect it to, this should eliminate failed CI builds due to postfix installs erroring out.

Ref: https://github.com/marketplace/actions/retry-step
2021-07-06 19:56:26 +02:00
Marcus Bointon 58282fb4ff
Merge pull request #2411 from jrfnl/feature/tests-add-tests-quotedstring
Tests: introduce dedicated tests for the `PHPMailer::quotedString()` method
2021-07-06 19:12:00 +02:00
jrfnl 641b4c2391 Tests: introduce dedicated tests for the `PHPMailer::quotedString()` method
So far, this method did not have dedicated tests, though the `PHPMailerTest::testAttachmentNaming()` test covered this partially.

The test file this commit introduces, tests all aspects of the method as well as documents the current behaviour of the method.

Test cases largely inspired by the tests in the `PHPMailerTest::testAttachmentNaming()` method.
2021-07-06 15:51:16 +02:00
Marcus Bointon 7c862d35da
Update codecov badge 2021-07-06 09:43:04 +02:00
Marcus Bointon 0374a85778
Merge pull request #2408 from jrfnl/feature/tests-reorganize-19
Tests: move mime type test(s) to own file
2021-07-06 09:36:34 +02:00
Marcus Bointon 7fe5bcad1d
Merge pull request #2407 from jrfnl/feature/enable-codecoverage-monitoring-codecov
GH Actions: set up code coverage monitoring via codecov
2021-07-06 09:28:51 +02:00
jrfnl abc401485e MimeTypesTest: add `@covers` tag 2021-07-04 15:13:23 +02:00
jrfnl 55e0813d04 MimeTypesTest: add additional test cases
Including test cases with:
* Different text case.
* An extension not in the list.
* Passing an empty string
2021-07-04 15:13:18 +02:00
jrfnl 6ee8e17c33 MimeTypesTest: reorganize to use data provider
* Maintains the same test code and test case.
* Makes it easier to add additional test cases in the future.
2021-07-04 15:09:05 +02:00
jrfnl 0a84d20565 Tests/reorganize: move mime type tests to own file
As this test does not actually need an instantiated PHPMailer object, this class extends the `Yoast\PHPUnitPolyfills\TestCases\TestCase` instead of the `PHPMailer\Test\TestCase`.

Note: this doesn't move the complete test from the original test file, just select parts of the test method.
2021-07-04 15:09:03 +02:00
jrfnl c16da1afa8 GH Actions: set up code coverage monitoring via codecov
The Codecov service is a way to monitor test vs code coverage of a project over time and allows for the code coverage % + delta to be reported in each PR.

This commits:
* Adds a Codecov configuration.
* Adds a convenience script to the `composer.json` file to run the tests with or without code coverage.
* Adds a new matrix variable to the GH Actions `test` workflow to run the tests with code coverage and send the results to the Codecov service.
    Notes:
    - This disables the code coverage reporting in the "normal" test runs, including disabling `xdebug` for those runs which should make them slightly faster.
    - This splits the test runs into two sets:
        * High/low PHP are being run with code coverage (and have been removed from the "normal" test run matrix).
        * For all other PHP versions, the tests are being run without code coverage.
* Adds a badge to the README to show the current code coverage %.
2021-07-04 15:03:01 +02:00
Marcus Bointon e0c140a127
Merge pull request #2405 from jrfnl/feature/icaltest-simplify
ICalTest: minor simplifications
2021-07-04 14:59:20 +02:00
Marcus Bointon 1988527535
Merge pull request #2404 from jrfnl/feature/tests-reorganize-18
Tests: move pathinfo tests to own file
2021-07-04 14:51:47 +02:00
Marcus Bointon f4eba3a68c
Merge pull request #2403 from jrfnl/feature/setup-php-linting
GH Actions: add PHP linting job
2021-07-04 14:50:43 +02:00
Marcus Bointon f3978c38cc
Merge pull request #2406 from jrfnl/feature/remove-PR-template
Remove PR template
2021-07-04 14:50:09 +02:00
jrfnl ee9c363160 Remove PR template
PR 2373 changed the CI in such a way that coding standards errors will now be shown inline in the code of PRs.

With that change in place, having the information about running PHPCS in the pull request template has become redundant.
2021-07-04 01:47:09 +02:00
jrfnl cdc2164361 ICalTest: minor simplifications
Follow up on 2384.

1. This test does not actually need a regular expression to test the mime message, an `assertStringContainsString()` assertion is sufficient.
2. Remove duplicate information from the `$expected` parameter. The `Content-Type: text/calendar; method=` part will always be the same. Only the method name will change.
2021-07-03 22:00:40 +02:00
jrfnl 8771d5f146 MbPathinfoTest: add `@covers` tag 2021-07-03 13:00:03 +02:00
jrfnl 78cb650429 MbPathinfoTest: add additional test cases for `testMb_pathinfoWithOptions()`
... to ensure all supported options are covered by a test.
2021-07-03 13:00:01 +02:00
jrfnl 487551ddac MbPathinfoTest: add additional test cases for `testMb_pathinfoWithoutOptions()`
Including test cases with:
* Spaces in the paths.
* Incomplete file paths.

Note: the "empty string" test may need looking at.... should this return an empty array instead ?
2021-07-03 12:59:59 +02:00
jrfnl 3a03d51399 MbPathinfoTest: reorganize to use data providers
* Replace the existing test code with two new test methods using data providers.
* Maintains the same test code and test cases.
* Makes it easier to add additional test cases in the future.
2021-07-03 12:59:57 +02:00
jrfnl 64fa2bf831 Tests/reorganize: move pathinfo tests to own file
As this test does not actually need an instantiated PHPMailer object, this class extends the `Yoast\PHPUnitPolyfills\TestCases\TestCase` instead of the `PHPMailer\Test\TestCase`.

Note: this doesn't move the complete test from the original test file, just select parts of the test method.
2021-07-03 12:59:55 +02:00
jrfnl f0cfd3f49d GH Actions: add PHP linting job
This commit:
* Add a new dependency on the PHP Parallel Lint package for fast PHP linting.
    The PHP Parallel Lint package, in combination with the PHP Console Highlighter provides the following advantages in comparison with "plain" PHP linting:
    - Higher speed due to the parallel processes.
    - Improved usability by providing color coded syntax highlighting of found errors on the command-line.
    - Integration with the `cs2pr` tool, allowing for the results of the lint command to be shown in-line in PRs.
* Adds a Composer `lint` script for easy access to the tool for devs, while making sure the correct command line parameters will be used.
    The linting command as currently set up, will also check the example files for linting errors.
* Adds a GH Actions job for linting the code on the high/low supported PHP versions, one arbitrary interim version + an experimental build against PHP 8.1.
    The `cs2pr` tool has been enabled and will show the results of the non-experimental lint runs in-line in PRs.
    **Note**: For PHP 8.1, the `cs2pr` tool is not used as there is a known issue in the Parallel Lint tool with PHP 8.1 which breaks on the checkstyle reporting. There is already a [PR open](https://github.com/php-parallel-lint/PHP-Parallel-Lint/pull/64) to fix this upstream. Once this PR has been merged and a new version of Parallel Lint has been released, the separate step for PHP 8.1 linting can be removed.
 * Makes the `test` job in the GHA workflow dependent on the `lint` job having passed...
     ... as the tests would fail anyway if there are linting errors.
    Also adjusts the name of the `test` jobs to include the word "Test" so they can be easily distinguished from the Lint jobs.

Refs:
* https://github.com/php-parallel-lint/PHP-Parallel-Lint
2021-07-03 12:55:00 +02:00
Marcus Bointon 57a1323ef3
Merge pull request #2402 from jrfnl/feature/ghactions-various-tweaks
GH Actions: various tweaks
2021-07-03 12:47:47 +02:00
Marcus Bointon 69655d247a
Merge pull request #2401 from jrfnl/feature/tests-reorganize-17
Tests: move file name to type tests to own file
2021-07-03 12:47:25 +02:00
jrfnl 15994972fa GH Actions: test matrix - fix typo
There was a stray `.` in the string.
2021-07-02 17:48:31 +02:00
jrfnl 61e8701e02 GH Actions: test run - remove redundant dependency
The `xdebug` extension is already tagged as needed via the `coverage` setting, no need to add it to the `extensions` list.
---

Note: generally speaking, I personally normally don't pass an `extensions` list and allow the `setup-php` action to run with the default extensions, which is sufficient in most cases and would be sufficient here as well.

More than anything, I use the `extensions` key to _disable_ extensions for certain test runs, rather than enable them. Just something to consider.

The below documentation should give more insight.

Refs:
* https://github.com/shivammathur/setup-php/wiki/Php-extensions-loaded-on-ubuntu-18.04
* https://github.com/shivammathur/setup-php#heavy_plus_sign-php-extension-support
2021-07-02 17:46:08 +02:00
jrfnl 8a0e0d09f3 GH Actions: use predefined action to run composer install with caching
It is generally speaking a good idea to cache downloaded Composer packages between runs for performance reasons.

Now, this can be set up manually and would add two more steps to the scripts, or Ben's `composer-install` action can be used which will handle it all for you. The `composer-install` action is versatile and allows for passing additional parameters, so is perfectly suitable for this.

Ref: https://github.com/marketplace/actions/install-composer-dependencies
2021-07-02 17:41:07 +02:00
jrfnl a7c19c069b GH Actions: test run - remove "dependency version" matrix key
Running against stable/lowest dependencies is relevant when a package has runtime (non-dev) dependencies.
However, PHPMailer does not have runtime dependencies.

In other words, the `dependency-version` matrix key is redundant and unused, so we may as well remove it.
2021-07-02 17:37:19 +02:00
jrfnl bc5fe4dc1f GH Actions: CS run - remove matrix
The CS run only needs to run against one PHP version, so there is no need to set up a matrix for this.
2021-07-02 17:34:58 +02:00
jrfnl decf70fa2b FilenameToTypeTest: add `@covers` tag 2021-07-02 17:25:47 +02:00
jrfnl 76aa6a06cb FilenameToTypeTest: add some additional test cases
... which should be supported based on the function docs.

Note: the "empty string" test may need looking at.... is this a bug ?
2021-07-02 17:25:45 +02:00
jrfnl 6ba68af48c FilenameToTypeTest: reorganize to use data providers
* Maintains the same test code and test cases.
* Removes code duplication.
* Makes it easier to add additional test cases in the future.
2021-07-02 17:25:44 +02:00
jrfnl 77c1d87123 Tests/reorganize: move file name to type tests to own file
As this test does not actually need an instantiated PHPMailer object, this class extends the `Yoast\PHPUnitPolyfills\TestCases\TestCase` instead of the `PHPMailer\Test\TestCase`.

Note: this doesn't move the complete test from the original test file, just select parts of the test method.
2021-07-02 17:25:42 +02:00
Marcus Bointon 35ab349e01
Merge pull request #2400 from jrfnl/feature/tests-reorganize-16
Tests: move line break normalization tests to own file
2021-07-02 16:57:52 +02:00
jrfnl 8bfb7d1e2f NormalizeBreaksTest: add `@covers` tag 2021-07-02 15:23:43 +02:00
jrfnl d6f3fea0ea NormalizeBreaksTest: add extra test
... to verify the behaviour of the `PHPMailer::normalizeBreaks()` method when the `PHPMailer::$LE` property has been customized.
2021-07-02 15:23:43 +02:00
jrfnl 14d7458826 NormalizeBreaksTest: add additional test case
... to ensure text without line breaks is returned unchanged.
2021-07-02 15:23:43 +02:00
jrfnl ade3b63428 NormalizeBreaksTest: reorganize to use data providers
* Maintains (largely) the same test code and test cases.
* Removes code duplication.
* Makes it easier to add additional test cases in the future.
2021-07-02 15:23:43 +02:00
jrfnl 0f916dd90a Tests/reorganize: move line break normalization tests to own file
As this test does not actually need an instantiated PHPMailer object, this class extends the `Yoast\PHPUnitPolyfills\TestCases\TestCase` instead of the `PHPMailer\Test\TestCase`.

Note: this doesn't move the complete tests from the original test file, just select parts of two test methods.
2021-07-02 15:23:43 +02:00
Marcus Bointon 49a2ea60ee
Merge pull request #2399 from jrfnl/feature/testcase-improve-on-static-prop-stability
TestCase: iterate on resetting of static properties
2021-07-02 12:12:46 +02:00
jrfnl f6715fd047 TestCase: iterate on resetting of static properties
The `PHPMailer::preSend()` method may alter the value of the _`protect static`_ `PHPMailer::$LE` property.

a9978d2079/src/PHPMailer.php (L1494-L1504)

This means that tests which rely on the value of the property being the default, may start to fail unexpectedly depending on the _order_ in which tests are being run.
I.e. if the test relying on the default value is run first, all will be fine, however, if that same test is run _after_ a test which calls `preSend()` on a non-Windows box with PHP < 8.0 and with `$this->Mailer` set to `mail`, the test may fail unexpectedly.

This commit fixes that by expanding the previously introduced "resetting of static properties" logic.

This commit:
* Expands the list of static properties in the `TestCase` class to include the `PHPMailer::$LE` property.
* Introduces two new methods to the `TestCase` class:
    - `resetStaticProperties()` to reset all static properties listed in the `TestCase::$PHPMailerStaticProps` property to their default values.
    - `updateStaticProperty()` to change the value of one individual static property in a class.
* The `updateStaticProperty()` method was made `public static` to allow for tests which do not need an instantiated PHPMailer object and thus extend the `Yoast\PHPUnitPolyfills\TestCases\TestCase` directly to be able to use the method as well.
    If any such tests would use the method, that particular test will be responsible for resetting the value back to the default after the test.
* The resetting of the static properties has also been moved from the `set_up()` to the `tear_down()` method.
    As mentioned above, these static properties may be used by both tests extending this `TestCase` as well as test extending the `Yoast\PHPUnitPolyfills\TestCases\TestCase`. With that in mind, resetting _after_ each test will be more stable, as long as tests which extend the `Yoast\PHPUnitPolyfills\TestCases\TestCase` and would change static properties clean up after themselves.

**Note**: I'm not including the `PHPMailer::$IcalMethods` property in this change as AFAICS, this property is not being changed anywhere in the package code and as the property is `protected`, it cannot easily be changed from within a test either (and if it would be changed by a test, that test would be responsible for resetting it).

Also note: due to limitations in the `Reflection` extension, a hard-coded list of the default values of the static properties will need to be maintained in the `TestCase`. This cannot be helped as the `Reflection` extension does not have a way to accurately retrieve the default value of static properties in a PHP cross-version compatible manner.
2021-07-02 00:17:36 +02:00
Marcus Bointon a9978d2079
Merge pull request #2398 from jrfnl/feature/testcase-minor-tweaks
TestCase: various tweaks
2021-07-01 22:50:40 +02:00
jrfnl afd0da8a20 TestCase: minor tidying up
... of the inline comments in the `TestCase` file.
2021-07-01 21:52:19 +02:00
jrfnl b97983fcf6 TestCase: add support for initializing PHPMailer with exceptions
The `PHPMailer::__construct()` method has an optional `$exceptions` property to throw exceptions on errors.

Up to now, the `PHPMailer` instance created by the `set_up()` would not pass any parameters, effectively instantiating `PHPMailer` without turning on exceptions.

In a test situation it may be useful for tests to test the behaviour of a method _with_ and _without_ the exceptions option and to test that certain exceptions are thrown and throw the correct message.

With that in mind, I'm introducing a `USE_EXCEPTIONS` class constant to the `TestCase` which can be overloaded in individual test classes and will be used by the `set_up()` method to determine whether it will be instantiated with exceptions or not.

Includes introducing an overload of the class constant in one of the test class for which it would seem appropriate at this time.
Note: this does mean that the `testDKIMSigningMail()` test will show as errored instead of failed if no SMTP connection could be made, but that IMO is the more correct status anyhow.
2021-07-01 21:50:57 +02:00
jrfnl af68fb202a TestCase::setAddress(): add support for `ReplyTo`
This allows for using the `setAddress()` method in a more consistent manner (where appropriate).

Includes introducing the use of the `setAddress()` function in a few select places.

Note: I do wonder whether this method should ever be used outside of `set_up()` and `tear_down()`, but that is for further discussion and outside the scope of this commit.
2021-07-01 19:15:07 +02:00
jrfnl 1c32844af2 TestCase: remove unused property 2021-07-01 19:03:17 +02:00
Marcus Bointon c5c35e4378
Merge pull request #2397 from jrfnl/feature/tests-ensure-static-property-starts-with-default-value
Tests: stabilize handling of static properties in PHPMailer class
2021-07-01 18:49:15 +02:00
Marcus Bointon a8967c31a2
Merge pull request #2395 from jrfnl/feature/tests-reorganize-15
Tests: move wrapText test to own file
2021-07-01 18:48:13 +02:00
jrfnl 21fd99b057 ValidateAddressTest: stabilize handling of static `$validator` property in PHPMailer class
While this class does not (currently) _change_ the `PHPMailer::$validator` property, it does rely on the default value being the expected default.

By resetting the value of the property before and after the class, this is safeguarded for the current tests.
2021-07-01 18:29:49 +02:00
jrfnl 2077a3dc31 TestCase: stabilize handling of static properties in PHPMailer class
Public static properties changed by individual tests were not being reset to their default value prior to the next test being run.
This could influence the test results of subsequent tests as static properties are not automatically reset when a new instance of a class is instantiated. See: https://3v4l.org/8s1RB

Luckily this didn't aversely affect the tests so far, but should be safeguarded for the future.

There are only three static properties in the `PHPMailer` class, with only one of these being `public`.

This commit introduces a code snippet which will reset any static properties as listed in the `$PHPMailerStaticProps` property of the `TestCase` to the default value, as also set in the `$PHPMailerStaticProps` property, at the start of the `set_up()` which is run before each test using the `TestCase`.

For now, this is only relevant for the `ValidateAddressCustomValidatorTest` test and only when the `testSetDefaultValidatorToCustom()` test would fail before resetting the property. All the same, having the reset in place by default will ensure that future tests which change this property won't introduce side-effects to other tests.
2021-07-01 18:29:30 +02:00
jrfnl b5826af2df WrapTextTest: add `@covers` tag 2021-06-30 22:45:01 +02:00
jrfnl e1bf4a0dd5 WrapTextTest: add additional test cases
... in part to document the behaviour of the function, in part to actually test it.

By the looks of it more tests are still needed though to raise the code coverage of this function to 100%.

I'd also recommend adding tests with different charset settings as the current tests are all based on the default charset (`CHARSET_ISO88591`).

Also note: the "empty string" test may need looking at.... is this a bug ?
2021-06-30 22:44:34 +02:00
jrfnl 3ed9f04ff2 WrapTextTest: reorganize to use data providers
* Maintains the existing test cases.
* Prevent one failing assertion hiding a potential second failure.
* Makes it easier to add additional test cases in the future.
2021-06-30 22:36:11 +02:00
jrfnl f9d63167df Tests/reorganize: move wrapText test to own file 2021-06-30 22:36:09 +02:00
Marcus Bointon 03edf2348c
Merge pull request #2394 from jrfnl/feature/tests-skip-pop-tests-on-windows
PopBeforeSmtpTest: skip on Windows
2021-06-30 15:31:12 +02:00
jrfnl 39426ae930 PopBeforeSmtpTest: skip on Windows
The shell commands used in the test are not available on Windows, so these tests would always fail, so we may as well skip them.
2021-06-29 12:36:07 +02:00
Juliette c717120668
Tests/reorganize: move Auth CRAM MD5 test to own file (#2392)
As this test is marked _incomplete_, no further review of the test has been done and no `@covers` tag has been added.

Co-authored-by: jrfnl <jrfnl@users.noreply.github.com>
2021-06-29 11:22:51 +02:00
Marcus Bointon 84325b80b3
Improve simple messageid regex for default pattern 2021-06-28 10:54:41 +02:00
Marcus Bointon cb25751853
Minor tweak to MessageID regex, fixes #2388 2021-06-28 10:28:28 +02:00
Juliette 3a30a0b963
PHPMailer::createHeader: minor tweak to messageID validation (#2391)
Minor improvement to the *massive* improvement from 853afcb858.

The `$` in a regex means "match the end of a string or new line right before the end". Using the `D` modifier prevents the matching on the new line.

Ref:
* https://www.php.net/manual/en/reference.pcre.pattern.modifiers.php
* http://web.archive.org/web/20131226183006/http://blog.php-security.org/archives/76-Holes-in-most-preg_match-filters.html

Co-authored-by: jrfnl <jrfnl@users.noreply.github.com>
2021-06-28 10:05:36 +02:00
Marcus Bointon 853afcb858
Stricter checking of custom Message IDs, see #2388 2021-06-28 08:51:09 +02:00
Juliette a55b8b68af
Tests: move utf8CharBoundary test to own file (#2389)
* Tests/reorganize: move utf8CharBoundary test to own file

* Utf8CharBoundaryTest: reorganize to use data providers

This:
* Renames the test method and moves the description to the docblock.
* Decouples the test from the PHPMailer `TestCase` as it doesn't need the complete `set_up()` and `tear_down()`.
* Moves the test cases to a data provider.
* Adds a `@covers` tag.

* Utf8CharBoundaryTest: add `@todo` reminder

This really could do with some more test cases to properly cover all paths and branching in the method.

Co-authored-by: jrfnl <jrfnl@users.noreply.github.com>
2021-06-28 08:51:00 +02:00
Juliette 6477e1a6d7
Tests: move address splitting tests to own file (#2387)
* Tests/reorganize: move address splitting tests to own file

As this test does not actually need an instantiated PHPMailer object, this class extends the `Yoast\PHPUnitPolyfills\TestCases\TestCase` instead of the `PHPMailer\Test\TestCase`.

* ParseAddressesTest: reorganize the testAddressSplitting() test

This commit:
* Adds two new test methods, one for testing address splitting using the PHPMailer native implementation, one for testing address splitting using the IMAP implementation.
    Both these methods use the same data provider.
* Adds a PHPUnit `@requires` tag for the IMAP extension to the IMAP version of the test.
* Adds a type check `assertIsArray()` before doing the content checks on the method return value.
* Changes the tests to do a more detailed `assertSame()` test instead of the previous `assertCount()` and `assert[Not]Empty()` checks.
* Sets up the data provider to have the detailed output arrays for comparison.

The actual test cases in the rewritten test are the same as were previously being tested.

* ParseAddressesTest: replace remaining test by dataprovider entry

The `testImapParsedAddressList_parseAddress_returnsAddressArray()` and the `testImapParsedAddressList_parseAddress_returnsAddressArray_usingImap()` tests were largely duplicates of each other, with the only real difference being the value of the second parameter passed to the `PHPMailer::parseAddresses()` method (`$useimap`).

This commit:
* Removes these two tests in favour of adding the test case to the data provider added in the previous commit.

In effect, the same test case is still being tested just as thoroughly now, just with less (test) code.

* ParseAddressesTest: add two more (invalid) test cases to `dataAddressSplitting()`

* PHPMailer::parseAddresses(): bug fix

If invalid email addresses are passed to any of the IMAP functions - in this case to `imap_rfc822_parse_adrlist()` - IMAP may generate error notices or warnings.
If nothing is done with these, they will be displayed at PHP shutdown.

The notice will look something like this, for instance:
```
Notice: Unknown: Missing or invalid host name after @ (errflg=3) in Unknown on line 0
```

This bug was exposed by the newly added unit tests. You should be able to see the issue if you run the tests over the previous commit.

As PHPMailer is not interested in invalid addresses, we can just ignore these notices and errors, but we *do* have to _clear_ them to prevent the notices from being thrown.

Refs:
* https://www.php.net/manual/en/function.imap-rfc822-parse-adrlist.php
* https://www.php.net/manual/en/function.imap-errors.php
* https://github.com/ddeboer/imap/issues/308
* https://stackoverflow.com/questions/3378469/how-to-get-rid-of-error-messages-with-phps-imap-fetchstructure

* ParseAddressesTest: reorder the test cases in `dataAddressSplitting()`

... to a slightly more sane order for humans to follow and see at a glance what is being tested..

* ParseAddressesTest: add `@covers` tags

Co-authored-by: jrfnl <jrfnl@users.noreply.github.com>
2021-06-25 15:39:21 +02:00
Juliette 033e2d7586
Tests: move message ID test to own file (#2386)
* Tests/reorganize: move message ID test to own file

* GetLastMessageIDTest: use the correct parameter order

For PHPUnit assertions which expect an `$expected` and a `$result` parameter, the parameter order is always `( $expected, $result, ...).

While it may not seem important to use the correct parameter order for assertions doing a straight comparison, in actual fact, it is.
The PHPUnit output when the assertions fail expects this order and the failure message will be reversed if the parameters are passed in reversed order which leads to confusion and makes it more difficult to debug a failing test.

* GetLastMessageIDTest: split into separate tests

* GetLastMessageIDTest: reorganize to use data providers

While initially still only addressing the original test cases, using a data provider here will allow for adding additional test cases more easily.

* GetLastMessageIDTest: add additional tests

Adding additional tests based on the code this is supposed to be testing.

**Note**: I've put the test cases in the "valid"/"invalid" data providers based on the current reality.
Some of the test cases I've added to the "valid" data provider _might_ actually be **_invalid_**. If that's the case, the regex used on line 2554 needs adjusting to account for them (after which the test cases can be moved to the "invalid" data provider).

* GetLastMessageIDTest: add `@covers` tags

Co-authored-by: jrfnl <jrfnl@users.noreply.github.com>
2021-06-25 14:26:57 +02:00
Juliette 4ad936e3b5
Tests: move line length detection tests to own file (#2385)
* Tests/reorganize: move line length detected tests to own file

* HasLineLongerThanMaxTest: various test tweaks

Minor test tweaks:
* Add `@covers` tag.
* Inline comment punctuation.
* Minor code readability tweaks.

Co-authored-by: jrfnl <jrfnl@users.noreply.github.com>
2021-06-25 11:28:10 +02:00
Juliette 6d613a4c8b
Tests: move ICal tests to own file (#2384)
* Tests/reorganize: move ICal tests to own file

* ICalTest: reorganize to use data providers

These three tests were 99% duplicate code. Using a data provider removes the duplication, while the actual tests being run are still 100% the same, including same test count and assertion count.

* ICalTest: add additional tests

... to ensure all valid methods are checked.

Adding these extra tests is a breeze now with the data provider setup.

* ICalTest: various test tweaks

Minor test tweaks:
* Add `@covers` tag. **_<- is this correct ?_**
* Minor comment punctuation.

Co-authored-by: jrfnl <jrfnl@users.noreply.github.com>
2021-06-24 21:18:12 +02:00
Juliette a4e3c130ae
Tests: move OAuth test to own file (#2383)
* Tests/reorganize: move OAuth test to own file

This test uses the `Yoast\PHPUnitPolyfills\TestCases\TestCase` instead of the `PHPMailer\Test\TestCase` base class as it doesn't need the `set_up()` or `tear_down()` methods from the PHPMailer base test class.

* OAuthTest: various test tweaks

Minor test tweaks:
* Add `@covers` tags.
* Add "failure" messages to assertions.
* Minor comment punctuation.

Co-authored-by: jrfnl <jrfnl@users.noreply.github.com>
2021-06-24 19:19:36 +02:00
Juliette 8317ed0bb5
Tests: move POP before SMTP tests to separate file (#2382)
* Tests/reorganize: move POP before SMTP tests to own file

This also removed the `$pids` property and handling from the PHPMailer base `TestCase` and moves this to the POP test class.

As this test now does not actually need an instantiated PHPMailer object, this class extends the `Yoast\PHPUnitPolyfills\TestCases\TestCase` instead of the `PHPMailer\Test\TestCase`.

* PopBeforeSmtpTest: move `@group` tags

... to the class level and remove them from the individual test functions.

* PopBeforeSmtpTest: various test tweaks

Minor test tweaks:
* Add `@covers` tag at class level.
* Inline comment punctuation.
* Minor code readability tweaks.

Co-authored-by: jrfnl <jrfnl@users.noreply.github.com>
2021-06-24 15:22:24 +02:00
Juliette d2780d4125
Tests: move tests related to DKIM to separate file (#2381)
* Tests/reorganize: move DKIM related tests to own file

* DKIMTest: stabilize removal of private key file

When an assertion in a test fails, the rest of the code within the test method is no longer executed.
This means that for a test which - like three out of the five DKIM test - creates a file, the test "clean up" via `unlink()` is also no longer executed.
It also means that one test may - unintentionally - interfere with the results of another test due to the file still existing, while it is expected to have been removed.

Aside from that, the `$privatekeyfile` variable used in the various test is the same everywhere, but not consistently used in the tests, as the `'dkim_private.pem'` is hard-coded in multiple places, which decreases maintainability.

This commit fixes both these issues by:
* Declaring a class constant with the target private key file name for use in the test method.
* Implements use of this constant throughout the tests.
* Removes the `unlink()` call from the individual tests, in favour of executing it via the test `tear_down()`, which should still be executed, even when a test has failed.
    Note: as the file also contains two tests which do not create the private key file, but for which the `tear_down()` would also be executed, the `unlink()` call is wrapped in a `file_exists()`.

* DKIMTest: move `@group` tags

... to the class level and remove them from the individual test functions.

* DKIMTest: add missing `@requires` tags

Three out of the five tests actually require the `openssl` extension. Only one was so marked.

* DKIMTest: various test tweaks

Minor test tweaks:
* Rename a test to a more specific name to allow for easier test filtering via PHPUnit.
* Add `@covers` tags (Needs review!)
* The `@see` tag is indented for code elements. For external links, the `@link` tag should be used.
* Inline comment punctuation.
* Minor code readability tweaks.

* DKIMTest: add two additional tests

... to cover the "open SSL" not available case.

Co-authored-by: jrfnl <jrfnl@users.noreply.github.com>
2021-06-24 13:20:27 +02:00
Juliette b7910e3978
Tests: move tests for the various mail transports to separate file (#2380)
* Tests/reorganize: move email transport tests to own file

* MailTransportTest: various test tweaks

Minor test tweaks:
* Add `@covers` tags (Needs review! - especially the `testMailSend()` method seems to do more than it should)
* Check if test skipping is necessary at the start of a test method.
* Add "failure message" for each assertion in tests with multiple assertions.
* Tidy up inline comments.

Co-authored-by: jrfnl <jrfnl@users.noreply.github.com>
2021-06-24 10:30:20 +02:00
Marcus Bointon 3991967c80
Only need these validator functions to be loaded for this test 2021-06-23 23:50:26 +02:00
Marcus Bointon ff1abf608c
Don't need this noise; a failing test is enough 2021-06-23 23:42:09 +02:00
Marcus Bointon 723455d1b7
Comment 2021-06-23 23:42:09 +02:00
Marcus Bointon c773286b98
Readme 2021-06-23 23:42:09 +02:00
Marcus Bointon 8de8425712
Security note 2021-06-23 23:42:09 +02:00
Marcus Bointon 482e18ee05
Gmail notes 2021-06-23 23:42:08 +02:00
Marcus Bointon e0975c2c86
Prefer SMTPS over SMTP+STARTTLS in examples 2021-06-23 23:42:08 +02:00
Juliette ee70f2265e
Tests: move tests for PHPMailer::validateAddress with custom validator to separate file (#2379)
* Tests/reorganize: move email validation using custom validator test to own file

* ValidateAddressCustomValidatorTest: reorganize test

Split the test into three tests, each testing a specific situation and use a data provider for one of the tests.

Co-authored-by: jrfnl <jrfnl@users.noreply.github.com>
2021-06-23 23:42:01 +02:00
Juliette e6445ac201
Tests: move tests for `PHPMailer::validateAddress` to separate file (#2378)
* Tests/reorganize: move email validation test to own file

As this test does not actually need an instantiated PHPMailer object, this class extends the `Yoast\PHPUnitPolyfills\TestCases\TestCase` instead of the `PHPMailer\Test\TestCase`.

* ValidateAddressTest: reorganize to use data providers

The original test as was, would run through a number of arrays and keep track of fails/passes, only to use an assertion at the end to check that the list of "fails" was empty.
In addition to this, the original test also contained some additional assertions which would never be run if the earlier assertion would fail. (failing assertion possibly hiding more failing (or passing) assertions).

Using data providers for these kind of data array based tests, has a couple of advantages:
1. Each data set is counted as an individual test.
2. Each test can be set up to have only one assertion.
3. When a test for a data set fails, PHPUnit just moves on to the next data set, instead of failing the test and not examining the rest of the test cases.

With that in mind, this test has now been reorganized into multiple test functions, each with one or more data providers.

In addition to that:
* Each data set in a test provider is named after the email address it provides, with optionally a prefix to show which data provider it came from.
    This has two advantages:
    1. When using the `--testdox` runner, the output will list each test case by name.
    2. When a test fails, instead of getting a "failed with data set 65" message, you now get a "failed with data set _data set name_" message, and as the data set name is the same as the email address value, it's easy to see which test case failed.
* Each assertion now has a "failure message" attached, as the default "true does not match false" message from PHPUnit is not very descriptive.

* ValidateAddressTest: enable two out of three of the unused data sets

The original test contained three additional data sets which were *not* being tested:
* `$invalidphp`
* `$validqandc`
* `$validipv6`

The `$invalidphp` data set has now been set up as a data provider and has been added to the `testInvalidAddresses()` test.
The `$validipv6` data set has now been set up as a data provider and has been added to the `testValidAddresses()` test.

And the `$validqandc` data set has been removed after consultation with synchro.

Note: there are six test in the `$validipv6` array which are currently failing. Those have been commented out to be addressed later.

* ValidateAddressTest: add `@todo`

While the tests in this class will show that the `PHPMailer::validateAddress()` is 100% covered by tests, the tests do **not** in actual fact test all functionality properly.

To that end, I've added a recommendation in a `@todo` at the top of the class to document how these tests could be further improved in a future iteration.

Co-authored-by: jrfnl <jrfnl@users.noreply.github.com>
2021-06-23 23:09:07 +02:00
Juliette c576a531b1
PHPMailerLangTest: rename and minor tweaks (#2377)
* PHPMailerLangTest: rename test class to `TranslationCompletenessTest`

As the test class has been moved to a separate directory, we may as well make the class name more descriptive of what the test class actually does.

* TranslationCompletenessTest: various test tweaks

Minor test tweaks:
* Move `@group` tag up to class level.
* Add a `@coversNothing` tag as this test is more a maintainer utility/package test than a test to cover functionality in code.
* Tidy up inline comments.

Co-authored-by: jrfnl <jrfnl@users.noreply.github.com>
2021-06-23 23:04:15 +02:00
Juliette 6372ff87c1
Tests: introduce base testcase and move test classes to subdirectories (#2376)
* Tests/reorganize: add an abstract base testcase

As a first step towards reorganizing the tests, this commit:
* Creates an abstract base `TestCase` class which can be extended by concrete child test classes and holds the generic properties and helper methods for use throughout the tests.
    Based on their use, the visibility of properties and methods have been adjusted for the new setup.
* Removes the generic property and helper method declarations from the concrete test class.
* Moves the `require` statement for the `validators.php` file to a `set_up_before_class()` method in the base `TestCase`.

* Tests/reorganize: define base directory in set_up_before_class

The `$this->INCLUDE_DIR` property which points to the project root directory does not change at any time during the test run, but was being redefined for every test in the `set_up()` method.

As this is in effect a _constant_ value, let's define it as a constant in the TestCase `set_up_before_class()` method instead.

Notes:
Both actions executed in the `set_up_before_class()` method are typically things for a test bootstrap file.
However, to allow for PHPUnit to be able to run from both a Composer install as well as a Phar file, without having to create custom autoloaders, it is simpler to have the `vendor/autoload.php` file as the bootstrap file as, in that case, PHPUnit will handle the loading order and prevent loading conflicting PHPUnit files from a Composer install when running via the Phar.
With this in mind, putting these actions in a `set_up_before_class()` method is a valid compromise.

* Tests/reorganize: move actual test files to subdirectories

... leaving the test root directory to only contain test utility files.

Note: I've added a second entry for the test generated files to the `.gitignore`. Adding this entry instead of replacing the entry allows for any existing generated files in contributor clones to continue to be ignored.
At a later point in time, it could be elected to remove the original entry, once all active contributors have updated their installs and removed any stray generated files from their `test` root directories.

Co-authored-by: jrfnl <jrfnl@users.noreply.github.com>
2021-06-23 22:43:46 +02:00
Juliette 711de8bf70
GH Actions: run tests on PRs and show CS violations (#2373)
* GH Actions: run on PRs and allow for manually triggering

Currently the workflow only ran on `push` events, which - as forks have to enable the workflows - means that PRs could be submitted without CI having been run and you'd only see the CI results on merge.

By adding the `pull_request` event, it is ensured that CI is always run within the main repo for pull requests. This also allows for branch protection to be enabled with "required statuses".

Additionally, triggering a workflow for a branch manually is not supported by default in GH Actions, but has to be explicitly allowed.

This is useful if, for instance, an external action script or composer dependency has broken.
Once a fix is available, failing builds for `master` or open PRs can be retriggered manually instead of having to be re-pushed to retrigger the workflow.

Ref: https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/

* GH Actions: report CS violations in the PR

Currently the PR template asks for people to run the CS tooling.

As the PHPCS tool is also run in the test workflow and this workflow - per the previous commit - will now also be run on pull requests, we can make life easier on contributors.

The cs2pr tool allows to display the results from an action run in checkstyle format in-line in the PR code view.
This commit enables this for PHPCS, which means that the code view will now show CS violations in the PR.

Ref: https://github.com/staabm/annotate-pull-request-from-checkstyle

Co-authored-by: jrfnl <jrfnl@users.noreply.github.com>
2021-06-23 11:03:18 +02:00
Juliette c33a304650
Tests: various improvements (#2372)
* Tests: remove unused test bootstrap file

The PHPUnit config file requires the `vendor/autoload.php` file as the test bootstrap and this file is not referenced anywhere in the code base, so this is dead code.

* Tests: apply test method naming conventions

For tests to be picked up by PHPUnit automatically, the method should start with the prefix `test`.
For differently named tests, the `@test` annotation can be used to still mark a method as a test and get PHPUnit to run it.

As the vast majority of tests use the "prefix the method with `test`" convention, this changes the names of the few tests which did not comply with that convention and removes the `@test` annotations.

* Tests: use test skipping where appropriate

In this case, the condition being tested should never be `false`, so could possibly be removed.

All the same, if the condition _would_ result in a `false`, the test would be marked as "risky" as no assertions would be run by it.

This can be avoided by using the condition to set a test skip annotation, instead of wrapping the actual test code in the condition.

* Tests: use strict assertions

PHPUnit contains a variety of assertions and the ones available has been extended hugely over the years.
To have the most reliable tests, the most specific assertion should be used.

Most notably, this changes calls to `assertEquals()` to `assertSame()`, where `assertEquals()` does a loose type comparison `==` and `assertSame()` does a strict type `===` comparison.

The only real exception to this is when comparing two objects, as in that case, the objectID will not be the same, so those should still use `assertEquals()` - or the PHPUnit 9.4.0 `assertObjectEquals()` method for comparing value objects using a callback method in the ValueObject class.

* Tests: use the correct parameter order

For PHPUnit assertions which expect an `$expected` and a `$result` parameter, the parameter order is always `( $expected, $result, ...).

While it may not seem important to use the correct parameter order for assertions doing a straight comparison, in actual fact, it is.
The PHPUnit output when the assertions fail expects this order and the failure message will be reversed if the parameters are passed in reversed order which leads to confusion and makes it more difficult to debug a failing test.

* Tests: use static closures

... when the closure doesn't use `$this`.

Co-authored-by: jrfnl <jrfnl@users.noreply.github.com>
2021-06-23 11:01:19 +02:00
Juliette 8eacfe7925
GH Actions: don't run the docs workflow on forks (#2371)
The `docs` workflow to deploy the GH Pages website is run on pushes to `master`, but that includes pushes to `master` in forks, which obviously can't deploy to the GH Pages site.

This means that in forks (and there are nearly 9000 of them), this workflow will always fail, while in reality, it shouldn't be run in the first place.

So, I'd like to propose making this small change, which _should_ prevent the `docs` workflow from being run on forks.

Co-authored-by: jrfnl <jrfnl@users.noreply.github.com>
2021-06-23 11:00:21 +02:00
Juliette 702502aca2
.gitattributes: sync with reality (#2374)
The `.gitattributes` file was no longer in line with the files in the repo. Fixed now.

Co-authored-by: jrfnl <jrfnl@users.noreply.github.com>
2021-06-23 10:59:47 +02:00
Juliette 4ba9531372
PHP 8.1: ensure consistent exception messages (#2365)
From the PHP 8.1 changelog:
> `htmlspecialchars()`, `htmlentities()`, `htmlspecialchars_decode()`,
>` html_entity_decode()` and `get_html_translation_table()` now use
> `ENT_QUOTES | ENT_SUBSTITUTE` rather than `ENT_COMPAT` by default. This means
> that `'` is escaped to `&#039;` while previously it was left alone.
> Additionally, malformed UTF-8 will be replaced by a Unicode substitution
> character, instead of resulting in an empty string.

Ref: 28a1a6be08/UPGRADING (L149-L154)

If effect this means that the output of the above mentioned functions may be different depending on the PHP version and the passed text string, unless the `$flags` parameter is explicitly passed.

This patch proposes to add the old default to the one affected function call in PHPMailer, though most other flag combination choices would be just as valid, as long as a `$flags` parameter is passed.

Ref: https://www.php.net/manual/en/function.htmlspecialchars.php

Co-authored-by: jrfnl <jrfnl@users.noreply.github.com>
2021-06-22 19:00:42 +02:00
Juliette 9093c84614
Composer: update version constraints for PHPUnit Polyfills (#2366)
PHPUnit Polyfills 1.0.0 has been released.

Ref: https://github.com/Yoast/PHPUnit-Polyfills/releases/tag/1.0.0

Co-authored-by: jrfnl <jrfnl@users.noreply.github.com>
Co-authored-by: Marcus Bointon <marcus@synchromedia.co.uk>
2021-06-22 18:59:27 +02:00
Juliette c000d1eaac
PHP 8.1: fix deprecation warning in PHPMailer::addCustomHeader() (#2370)
On PHP 8.1, passing `null` to `trim()` generates a `trim(): Passing null to parameter #1 ($string) of type string is deprecated` notice.

As the `$value` is optional and may not even get set via the `name:value` parsing, the code as was, was causing this notice to be thrown.

This fix is covered by the existing unit tests and was exposed when running the tests on PHP 8.1 with `error_reporting` set to `E_ALL`.

Co-authored-by: jrfnl <jrfnl@users.noreply.github.com>
2021-06-22 18:52:43 +02:00
Juliette b2df807028
Composer: use a version of PHPCS compatible with PHP 8 (#2364)
While working on 2363, I noticed that the code sniffer run was using PHP 8.0, but Composer still allowed for a PHP_CodeSniffer version to be installed which is not fully compatible with PHP 8.0.

Note: there are still two known incompatibilities with PHP 8.0 in PHPCS 3.6.0, but everything else has been fixed.

Ref: https://github.com/squizlabs/php_codesniffer/releases

Co-authored-by: jrfnl <jrfnl@users.noreply.github.com>
2021-06-22 18:52:00 +02:00
Juliette 02eadcc95f
GH Actions: start testing against PHP 8.1 (#2363)
* GH Actions: start testing against PHP 8.1

The first alpha of PHP 8.1 has been released, so now seems like a good time to start running the tests against PHP 8.1.

For now, I've configured it to allow builds against PHP 8.1 to fail, while PHP 8.1 is still unstable.

Also: PHPUnit doesn't officially support PHP 8.1 yet, so to install PHPUnit 9.x on PHP 8.1, we need to use `--ignore-platform-reqs`, as otherwise PHPUnit 4.8 would be installed (last PHPUnit version without strict PHP version constraints).

* GH Actions: set error reporting to E_ALL

Turns out the default setting for `error_reporting` used by the SetupPHP action is `error_reporting=E_ALL & ~E_DEPRECATED & ~E_STRICT` and `display_errors` is set to `Off`.

For the purposes of CI, I'd recommend running with `E_ALL` and `display_errors=On` to ensure **all** PHP notices are shown.

Co-authored-by: jrfnl <jrfnl@users.noreply.github.com>
2021-06-22 18:51:01 +02:00
Marcus Bointon a5b5c43e50
Changelog 2021-06-16 16:33:43 +02:00
Marcus Bointon e121da364f
Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2021-06-16 16:31:07 +02:00
Marcus Bointon 74e512aa75
Security update 2021-06-16 16:29:16 +02:00
Marcus Bointon acd264bf17
Merge branch 'CVE-2021-34551'
# Conflicts:
#	SECURITY.md
#	changelog.md
2021-06-16 16:02:29 +02:00
Marcus Bointon 0063f83e8c
Changelog 2021-06-15 20:12:22 +02:00
Marcus Bointon 707205f255
Changelog 2021-06-15 20:04:30 +02:00
Marcus Bointon 1047838e84
Changelog 2021-06-15 20:03:50 +02:00
Marcus Bointon c2f191be6b
Changelog 2021-06-15 19:53:27 +02:00
Marcus Bointon 45f3c18dc6
Deny string-based callables altogether 2021-06-15 17:37:24 +02:00
Marcus Bointon 6334bab2af
CVE docs 2021-06-15 14:54:52 +02:00
Marcus Bointon de90099080
Add tests for injected validators 2021-06-15 14:54:40 +02:00
Marcus Bointon ce14f76dc6
More effective check 2021-06-15 14:49:48 +02:00
Marcus Bointon c40964df54
Filter callables with deny-list of built-in names 2021-06-15 11:02:33 +02:00
Marcus Bointon c718164ad3
WIP 2021-06-15 10:41:56 +02:00
Marcus Bointon 8107a91852
WIP 2021-06-10 22:31:30 +02:00
Léon Melis 453159e95b
Add detection support for Haraka transaction ID (#2347)
A typical SMTP transaction ID for Haraka looks like this:

```
250 Message Queued (14490C56-76FB-4932-A59B-A8299DB2B693.1)
```

This regex will detect and extract this transaction ID
2021-05-28 17:22:01 +02:00
Marcus Bointon 4839207650
Clarify comment 2021-05-10 23:22:22 +02:00
Marcus Bointon 9256f12d8f
6.4.1 2021-04-29 14:25:04 +02:00
Marcus Bointon fd7ec67a7c
Add more tests for bad paths 2021-04-29 10:53:19 +02:00
Marcus Bointon 26f2848d3b
Reorder path checks, fixes CVE-2020-36326 2021-04-29 10:52:38 +02:00
Marcus Bointon bc51d1f607
Add not-strictly-necessary backslash to avoid ambiguity 2021-04-29 10:51:05 +02:00
Marcus Bointon 7f267fb4aa
Match all RFC3986 scheme patterns 2021-04-29 10:50:09 +02:00
Marcus Bointon b1038ee356
Add composer scripts for syntax check and tests 2021-04-29 10:49:27 +02:00
taras-budzyn 0acc57db14
make text compliance with Ukrainian orthography (#2317) 2021-04-22 20:08:21 +02:00
wispas c3a51b1e93
Create phpmailer.lang-mgl.php
Translated to Mongolian language
2021-04-10 00:24:23 +08:00
Marcus Bointon 08cf13b39e
Make use of $to in doCallback consistent, see #2305 2021-04-08 12:11:57 +02:00
Marcus Bointon be427db8e5
Make use of $to in doCallback consistent 2021-04-08 11:30:41 +02:00
Marcus Bointon 050d430203
6.4.0 2021-03-31 22:06:42 +02:00
Robert L Mathews 95438b776d
Revert change that made the `mail()` and sendmail transports set the envelope sender if one isn't explicitly provided, as it causes problems described at <https://github.com/PHPMailer/PHPMailer/issues/2298> (#2300)
Co-authored-by: Robert L Mathews <rob@tigertech.net>
2021-03-31 21:48:35 +02:00
Marcus Bointon e8db1cd5da
Tidelift enterprise 2021-03-22 18:15:45 +01:00
Marcus Bointon 3843c6b401
Tidelift funding 2021-03-22 17:59:04 +01:00
Marcus Bointon a792de883b
Tidelift security 2021-03-22 17:55:59 +01:00
Marcus Bointon 59173eb2bf
Speed 2021-03-20 01:00:04 +01:00
Marcus Bointon 5f93907aa5
CS 2021-03-20 00:59:13 +01:00
Marcus Bointon 4c2197250d
Changelog 2021-03-19 22:25:48 +01:00
Marcus Bointon a9a634274e
Change locale filename as Serbian Latin is apparently `sr_latn` as per https://unicode-org.github.io/cldr-staging/charts/37/summary/sr_Latn.html 2021-03-19 22:25:39 +01:00
Marcus Bointon 48a91d2723
Drop unstable badge 2021-03-19 22:18:21 +01:00
Marcus Bointon f037388959
Comment about AUTH PLAIN format 2021-03-19 22:18:08 +01:00
Marcus Bointon 6b6badad3f
Check for mbstring before trying to use it in parseAddresses 2021-03-19 22:17:22 +01:00
Nemanja Jeremić c626b9e165
Add Serbian(Latin) translation (#2288) 2021-03-19 20:31:54 +01:00
Puneet Gopinath d13d6006a4
Fix links (#2285) 2021-03-17 09:38:27 +01:00
Steve 33fc96f877
correct invalid br (#2280) 2021-03-14 13:02:44 +01:00
Marcus Bointon 4a08cf4cdd
6.3.0 2021-02-19 16:28:08 +01:00
Marcus Bointon e86e4e3f2a
CS 2021-02-19 16:04:57 +01:00
Marcus Bointon 85b4c9cd2d
Remove dead code 2021-02-19 16:04:47 +01:00
Marcus Bointon 09bc306529
Handle envelope sender the same way in sendmail as in mail() 2021-02-19 16:04:33 +01:00
Marcus Bointon 79ead3b070
More debug info for sendmail & qmail 2021-02-19 16:01:19 +01:00
Marcus Bointon 2a8e3a2fc9
Improve debug output from mail() 2021-02-19 13:43:34 +01:00
Marcus Bointon 0f24617b0c
Consistent comment style 2021-02-19 13:42:01 +01:00
Marcus Bointon e28e3552a5
Remove test env diagnostic 2021-02-19 09:37:25 +01:00
Marcus Bointon 0a191cc7ec
More IDN twiddling 2021-02-18 23:46:33 +01:00
Marcus Bointon 7f22287bdb
More IDN twiddling 2021-02-18 23:14:13 +01:00
Marcus Bointon f9cc642d6d
CS 2021-02-18 14:44:15 +01:00
Marcus Bointon 34e1c900be
Charset woes 2021-02-18 14:35:27 +01:00
Marcus Bointon 60126a1b90
Back to xdebug we go... 2021-02-18 13:18:58 +01:00
Marcus Bointon 9ff9932ca7
Require pcov 2021-02-18 12:39:35 +01:00
Marcus Bointon f4910c8b0d
Only use clobber on old PHP versions 2021-02-18 12:36:19 +01:00
Marcus Bointon 19b7f3175d
Test env tweaks 2021-02-18 12:23:06 +01:00
Marcus Bointon d11f2e4731
Docs links 2021-02-18 12:10:26 +01:00
Marcus Bointon 7aa80026cb
CS 2021-02-18 11:48:59 +01:00
Marcus Bointon e2eb2304fe
Decode encoded names in the address parser, see #2266 2021-02-18 11:46:07 +01:00
Marcus Bointon c2c5a3b9af
Fix 2021-02-05 10:19:51 +01:00
Marcus Bointon b1582e23d9
CS 2021-02-05 10:16:39 +01:00
Marcus Bointon 43c7ff5644
Changelog 2021-02-05 10:08:04 +01:00
Marcus Bointon f9f5b8d21e
Make envelope sender config work the same way for `mail()`` as it does for SMTP, preferring `Sender` over `sendmail_from` ini setting. 2021-02-05 09:59:54 +01:00
Marcus Bointon 2eaa82698d
Update reference 2021-02-05 09:49:19 +01:00
Marcus Bointon d8630b9e2c
Add debug output for mail and sendmail transports 2021-02-05 09:49:02 +01:00
Marcus Bointon 640e68d332
Readme 2020-12-10 10:29:01 +01:00
Marcus Bointon 2999b16180
Handle 421 during EHLO/HELO, fixes #2189 2020-12-09 22:50:54 +01:00
Marcus Bointon 81319de7f1
Scrutinizer doesn't work with PHP 8 so remove it, update badges 2020-12-09 22:23:40 +01:00
codedge e78f71aa67
Migrate from TravisCI to GitHub Actions (#2218)
* Remove TravisCI, add Github actions

* Fix missing steps

* Fix composer command

* Fix composer command 2nd :(

* Install postfix

* Postfix set up

* Fix missing sudos

* More sudos

* Fix permissions

* Sendmail path

* Debug

* Debug

* Debug

* Sendmail path

* Code coverage path

* Fix clover.xml path

* Install qmail

* Github Actions CI

* Add more PHP versions

* Add more PHP versions

* Use Ubuntu 18.04

Co-authored-by: Marcus Bointon <marcus@synchromedia.co.uk>
2020-12-09 17:54:59 +01:00
Marcus Bointon 4ddf42b5c4
Readme 2020-12-04 15:15:53 +01:00
Marcus Bointon 5050b6012f
Handle early connection errors, see #2211 2020-12-04 15:15:20 +01:00
Manish Kumar 338b5597ac
Add travis jobs on ppc64le (#2196)
* Add travis jobs on ppc64le

* Make the tests PHPUnit cross version compatible + test on PHP 8 (#2202)

* .gitignore: ignore files created during a test run

* Tests: make config cross-version compatible

PHPUnit config file:

* Add `backupGlobals="true"`.
    The default value for this setting changed in PHPUnit 6 from `true` to `false`. By explicitly setting it to `true`, the existing behaviour is maintained.
* Remove the `logIncompleteSkipped` directive which is no longer supported.
* Remove a number of directives which use the default values and for which the defaults have not changed across PHPUnit versions.
* Remove the space in the testsuite name to make it more easily usable on the command line.
* Make sure that all src files are taken into consideration when calculating code coverage.
* Add XSD schema reference.
    Note: the config as-is will now validate for PHPUnit 4.4-9.2. For PHPUnit 9.3, the code coverage terminology has changed, though the "old" configuration is still supported.
    If needs be (PHPUnit 10), the config can be updated on the fly by using `--migrate-configuration`.

Other:
* Ignore a locally overloaded PHPUnit config file using the standard `phpunit.xml` file name.

Question: why does the config file not use the standard `phpunit.xml.dist` file name ? That would allow for running the tests without command line arguments.
That file can still be overloaded locally by a `phpunit.xml` file.

* Composer: add dependency on the PHPUnit Polyfills package

* Adds a dev dependency to the `yoast/phpunit-polyfills` package.
* As that package already requires and manages the installable versions for PHPUnit, remove this as an explicit requirement from `require-dev` in favour of letting the PHPUnit Polyfills package manage the versions.
    This will update the supported PHPUnit versions from `^4.8 || ^5.7` to `^4.8.36 || ^5.7.21 || ^6.0 || ^7.0 || ^8.0 || ^9.0`.
    Note: the supported versions for PHPUnit 4.x and 5.x are very specific and restrictive as it specifically targets the versions in which the "forward compatible" alias files for the namespaced classes are available.

This new package adds the following features:
* Polyfills for various PHPUnit cross-version changes.
* Basic test case and test listener.

Refs:
* https://github.com/Yoast/PHPUnit-Polyfills/

Includes adding the PHPUnit cache file, which is automatically created in PHPUnit 8 and 9, to the `.gitignore` file.

* Tests: switch over to use the Yoast\PHPUnitPolyfills\TestCases\TestCase

This switches the parent class of the test classes over `TestCase` from the PHPUnit native TestCase to the `Yoast\PHPUnitPolyfills\TestCases\TestCase`.

The Yoast `TestCase`:
* Provides cross-version compatibility using snake case fixture method names instead of the PHPUnit native camelCase names.

This switch over includes:
* Renaming the `setUp()` and `tearDown()` methods to, respectively, `set_up()` and `tear_down()` in various test classes for PHPUnit cross-version compatibility.

* Tests: switch over to use the Yoast Polyfill TestListenerDefaultImplementation

This switches `DebugLogTestListener` class over to using the PHPUnit 9 default implementation pattern in combination with using the `TestListenerDefaultImplementation` from the PHPUnit Polyfill library for the cross-version compatibility layer for the TestListener.

The Yoast `TestListenerDefaultImplementation`:
* Provides cross-version compatibility using snake case method names instead of the PHPUnit native camelCase names.

This switch over includes:
* Renaming the template methods used in the `DebugLogTestListener` to use their snake_case variant and removes the type declarations.

* Tests: switch out `assertInternalType()`

... in favour of the more specific assertion(s) as introduced in PHPUnit 7.5.0.

The new assertions are automatically polyfilled via the PHPUnit Polyfill repo as this test class extends the `Yoast\PHPUnitPolyfills\TestCases\TestCase` test case.

* Tests: switch out `assert[Not]Contains()` with string haystacks

... in favour of the string specific `assertString[Not]ContainsString() assertion(s) as introduced in PHPUnit 7.5.0.

The new assertions are automatically polyfilled via the PHPUnit Polyfill repo as this test class extends the `Yoast\PHPUnitPolyfills\TestCases\TestCase` test case.

* Tests: switch out `@expectException` annotations

... in favour of method calls to the `TestCase::expectException()` method as introduced in PHPUnit 5.2.0.

The new method and its variants are automatically polyfilled via the PHPUnit Polyfill repo as this test class extends the `Yoast\PHPUnitPolyfills\TestCases\TestCase` test case.

* Tests: switch out `assertRegExp()`

... in favour of the renamed `Assert::assertMatchesRegularExpression() as introduced in PHPUnit 9.1.0.

The new assertion is automatically polyfilled via the PHPUnit Polyfill repo as this test class extends the `Yoast\PHPUnitPolyfills\TestCases\TestCase` test case.

* Tests: mark a test as incomplete

As per the comment in the docblock:
> Needs a connection to a server that supports this auth mechanism, so commented out by default.

As the test cannot currently be executed succesfully, we may as well skip it with a meaningful message.

* Tests: mark a test as not performing assertions

... to prevent it from being marked as risky.

Co-authored-by: jrfnl <jrfnl@users.noreply.github.com>

* CS

* 6.2.0

* Use fully-qualified constant names for PHP versions (#2203)

This is a micro performance improvement. When PHP opcode generates opcodes, it can remove PHP version-specific `if` blocks if it sees `PHP_MAJOR_VERSION` or `PHP_VERSION_ID`. However, if the code belongs to a namespace, it cannot make that optimization because the code under namespace can declare the same constants.
This PR updates such PHP constants to be fully-qualified (with back-slash), which enables PHP to make the improvement.

To compare, this is the VLD opcode without fully-qualified constant names:

```php
namespace X;

if (\PHP_VERSION_ID < 80000) {
    echo "hi";
}
```

-->

```
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   5     0  E >   FETCH_CONSTANT                                   ~0      'X%5CPHP_MAJOR_VERSION'
         1        IS_SMALLER_OR_EQUAL                              ~1      ~0, 8
         2      > JMPZ                                                     ~1, ->4
   6     3    >   ECHO                                                     'hi'
   7     4    > > RETURN                                                   1
```

The same snippet, with the fully-qualified constants, PHP can simply eliminate and optimize the `if` block:

```
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   5     0  E > > JMPZ                                                     <true>, ->2
   6     1    >   ECHO                                                     'hi'
   7     2    > > RETURN                                                   1
```

* Update Slovak translations (#2204)

* Update phpmailer.lang-sk.php

* Update phpmailer.lang-sk.php

* Update phpmailer.lang-cs.php (#2205)

Co-authored-by: Juliette <663378+jrfnl@users.noreply.github.com>
Co-authored-by: jrfnl <jrfnl@users.noreply.github.com>
Co-authored-by: Marcus Bointon <marcus@synchromedia.co.uk>
Co-authored-by: Ayesh Karunaratne <Ayesh@users.noreply.github.com>
Co-authored-by: Róbert Kelčák <RobiNN1@users.noreply.github.com>
2020-11-27 00:55:57 +01:00
Róbert Kelčák 28e43da7af
Update phpmailer.lang-cs.php (#2205) 2020-11-26 23:45:56 +01:00
Róbert Kelčák 4933794b1f
Update Slovak translations (#2204)
* Update phpmailer.lang-sk.php

* Update phpmailer.lang-sk.php
2020-11-26 23:45:19 +01:00
Ayesh Karunaratne fa9c13cefd
Use fully-qualified constant names for PHP versions (#2203)
This is a micro performance improvement. When PHP opcode generates opcodes, it can remove PHP version-specific `if` blocks if it sees `PHP_MAJOR_VERSION` or `PHP_VERSION_ID`. However, if the code belongs to a namespace, it cannot make that optimization because the code under namespace can declare the same constants.
This PR updates such PHP constants to be fully-qualified (with back-slash), which enables PHP to make the improvement.

To compare, this is the VLD opcode without fully-qualified constant names:

```php
namespace X;

if (\PHP_VERSION_ID < 80000) {
    echo "hi";
}
```

-->

```
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   5     0  E >   FETCH_CONSTANT                                   ~0      'X%5CPHP_MAJOR_VERSION'
         1        IS_SMALLER_OR_EQUAL                              ~1      ~0, 8
         2      > JMPZ                                                     ~1, ->4
   6     3    >   ECHO                                                     'hi'
   7     4    > > RETURN                                                   1
```

The same snippet, with the fully-qualified constants, PHP can simply eliminate and optimize the `if` block:

```
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   5     0  E > > JMPZ                                                     <true>, ->2
   6     1    >   ECHO                                                     'hi'
   7     2    > > RETURN                                                   1
```
2020-11-25 19:27:52 +01:00
Marcus Bointon e38888a75c
6.2.0 2020-11-25 16:24:57 +01:00
Marcus Bointon 25ad471dea
CS 2020-11-25 15:46:22 +01:00
Juliette 78bda9997d
Make the tests PHPUnit cross version compatible + test on PHP 8 (#2202)
* .gitignore: ignore files created during a test run

* Tests: make config cross-version compatible

PHPUnit config file:

* Add `backupGlobals="true"`.
    The default value for this setting changed in PHPUnit 6 from `true` to `false`. By explicitly setting it to `true`, the existing behaviour is maintained.
* Remove the `logIncompleteSkipped` directive which is no longer supported.
* Remove a number of directives which use the default values and for which the defaults have not changed across PHPUnit versions.
* Remove the space in the testsuite name to make it more easily usable on the command line.
* Make sure that all src files are taken into consideration when calculating code coverage.
* Add XSD schema reference.
    Note: the config as-is will now validate for PHPUnit 4.4-9.2. For PHPUnit 9.3, the code coverage terminology has changed, though the "old" configuration is still supported.
    If needs be (PHPUnit 10), the config can be updated on the fly by using `--migrate-configuration`.

Other:
* Ignore a locally overloaded PHPUnit config file using the standard `phpunit.xml` file name.

Question: why does the config file not use the standard `phpunit.xml.dist` file name ? That would allow for running the tests without command line arguments.
That file can still be overloaded locally by a `phpunit.xml` file.

* Composer: add dependency on the PHPUnit Polyfills package

* Adds a dev dependency to the `yoast/phpunit-polyfills` package.
* As that package already requires and manages the installable versions for PHPUnit, remove this as an explicit requirement from `require-dev` in favour of letting the PHPUnit Polyfills package manage the versions.
    This will update the supported PHPUnit versions from `^4.8 || ^5.7` to `^4.8.36 || ^5.7.21 || ^6.0 || ^7.0 || ^8.0 || ^9.0`.
    Note: the supported versions for PHPUnit 4.x and 5.x are very specific and restrictive as it specifically targets the versions in which the "forward compatible" alias files for the namespaced classes are available.

This new package adds the following features:
* Polyfills for various PHPUnit cross-version changes.
* Basic test case and test listener.

Refs:
* https://github.com/Yoast/PHPUnit-Polyfills/

Includes adding the PHPUnit cache file, which is automatically created in PHPUnit 8 and 9, to the `.gitignore` file.

* Tests: switch over to use the Yoast\PHPUnitPolyfills\TestCases\TestCase

This switches the parent class of the test classes over `TestCase` from the PHPUnit native TestCase to the `Yoast\PHPUnitPolyfills\TestCases\TestCase`.

The Yoast `TestCase`:
* Provides cross-version compatibility using snake case fixture method names instead of the PHPUnit native camelCase names.

This switch over includes:
* Renaming the `setUp()` and `tearDown()` methods to, respectively, `set_up()` and `tear_down()` in various test classes for PHPUnit cross-version compatibility.

* Tests: switch over to use the Yoast Polyfill TestListenerDefaultImplementation

This switches `DebugLogTestListener` class over to using the PHPUnit 9 default implementation pattern in combination with using the `TestListenerDefaultImplementation` from the PHPUnit Polyfill library for the cross-version compatibility layer for the TestListener.

The Yoast `TestListenerDefaultImplementation`:
* Provides cross-version compatibility using snake case method names instead of the PHPUnit native camelCase names.

This switch over includes:
* Renaming the template methods used in the `DebugLogTestListener` to use their snake_case variant and removes the type declarations.

* Tests: switch out `assertInternalType()`

... in favour of the more specific assertion(s) as introduced in PHPUnit 7.5.0.

The new assertions are automatically polyfilled via the PHPUnit Polyfill repo as this test class extends the `Yoast\PHPUnitPolyfills\TestCases\TestCase` test case.

* Tests: switch out `assert[Not]Contains()` with string haystacks

... in favour of the string specific `assertString[Not]ContainsString() assertion(s) as introduced in PHPUnit 7.5.0.

The new assertions are automatically polyfilled via the PHPUnit Polyfill repo as this test class extends the `Yoast\PHPUnitPolyfills\TestCases\TestCase` test case.

* Tests: switch out `@expectException` annotations

... in favour of method calls to the `TestCase::expectException()` method as introduced in PHPUnit 5.2.0.

The new method and its variants are automatically polyfilled via the PHPUnit Polyfill repo as this test class extends the `Yoast\PHPUnitPolyfills\TestCases\TestCase` test case.

* Tests: switch out `assertRegExp()`

... in favour of the renamed `Assert::assertMatchesRegularExpression() as introduced in PHPUnit 9.1.0.

The new assertion is automatically polyfilled via the PHPUnit Polyfill repo as this test class extends the `Yoast\PHPUnitPolyfills\TestCases\TestCase` test case.

* Tests: mark a test as incomplete

As per the comment in the docblock:
> Needs a connection to a server that supports this auth mechanism, so commented out by default.

As the test cannot currently be executed succesfully, we may as well skip it with a meaningful message.

* Tests: mark a test as not performing assertions

... to prevent it from being marked as risky.

Co-authored-by: jrfnl <jrfnl@users.noreply.github.com>
2020-11-25 15:35:50 +01:00
Jérémy VIGNELLES a2e5e89925
Removed missing example link (#2190)
The code_generator.phps example seems to have been removed. Remove the associated link in the README
2020-11-07 15:57:24 +01:00
Marcus Bointon 4e9e676c26
Changelog 2020-11-06 23:33:00 +01:00
Yaacov Akiba Slama 5c559ad43d
Always use CRLF if php version is 8.0 or newer. (#2188)
Since https://git.php.net/?p=php-src.git;a=commit;h=6983ae751cd301886c966b84367fc7aaa1273b2d
which solved the bug https://bugs.php.net/bug.php?id=47983, the headers
have to always be CRLF separated.
Without this fix, a space is prepended to the header names.
2020-11-06 12:11:34 +01:00
Marcus Bointon 3dffb3e4ee
Load classes earlier 2020-10-29 15:33:52 +01:00
Marcus Bointon 9a85f499b2
Simplify security section in readme 2020-10-28 21:20:37 +01:00
Marcus Bointon f6321480c5
Retain uploaded extension in the attachment examples so that the MIME type is more easily obtained 2020-10-28 19:06:04 +01:00
Juliette 600bcde8a8
Travis: simplify and improve setup and run tests on php 5.5 (#2183)
* Travis: reorder the config

No functional changes.

* Travis: remove redundant env variable

The "CS check" is being run in its own stage with its own script, so there is no need for this environment variable anymore.

* Travis: disable Xdebug before running Composer

Composer can be slower when Xdebug is enabled, so when Xdebug isn't needed, let's disable it _before_ running Composer.

* Travis: remove duplicate build definitions

The default stage is the `test` stage and all builds defined in the `php` key, possibly combined with an `env` key, will automatically be build in the `test` stage.

No need to define them twice.

The only builds to declare explicitly in `jobs` are those which need custom `env`, `dist`, `script`s etc.

So:
* Remove those builds which don't need anything "custom" from the `jobs` key.
* Remove the one build which _does_ need something "custom" from the `php` key.

* Travis: re-enable testing against PHP 5.5

PHP 5.5 is not available on the default `xenial` distro, but by explicitly telling Travis to use the `trusty` distro, we can still  run the tests against PHP 5.5.

* Travis: run code coverage in a separate stage

Code coverage builds are "expensive" builds and if any of the tests would be failing, we are wasting time and resources by running them.

So, let's move the coverage build(s) to a separate stage, which will only run once the `test` stage has passed.

As this is now a separate stage, we don't need to set an environment variable to toggle code coverage on/off anymore. We can base conditions on the Travis stage name.

Let's also run code coverage for PHP 5.5, so both high and low PHP code coverage output can be combined for the most realistic results, taking PHP version specific conditions into account.

To make this work, we do need to tell Scrutinizer to expect reports from two separate code coverage runs.

And if I'm editing that file anyway, let's remove the redundant `filter` setting for a Scrutinizer native code coverage run which is turned off anyway.

* Tests: fix test failing on PHP 5.5

... due to the use of a PHPUnit method which is not available on PHPUnit 4.x.

These kind of things will be addressed better in a future PR, but this will get the build passing for now.

Co-authored-by: jrfnl <jrfnl@users.noreply.github.com>
2020-10-26 18:39:29 +01:00
Juliette 3cb2162859
Improve PHPCS config (#2182)
* PHPCS: rename config file

... to `phpcs.xml.dist` to allow devs to locally overload the file by using a `.phpcs.xml` or `phpcs.xml` file, to, for instance, test out some new rules.

Includes:
* Adding the local overload files to `.gitignore`.
* Adding the standard config file to `.gitattributes`.

* PHPCS: scan missing file

The `get_oauth_token.php` file in the project root seems to have been overlooked when configuring the PHPCS ruleset.

Fixed now by adding it to the file to be scanned.

Includes minor fixes to make the file comply with the configured standard.

* CS: fix two files

Two minor CS fixes.

* PHPCS: miscellaneous changes

* Don't fix the PHPCS/external standards version restraints.
* Add the PHPCS cache file to `.gitignore`.
* Removing the no longer existent `.php_cs` file from `.gitattributes`.

Co-authored-by: jrfnl <jrfnl@users.noreply.github.com>
2020-10-26 17:25:46 +01:00
Marcus Bointon ba88479850
Remove version note for phpcs on PR template 2020-10-26 17:24:29 +01:00
Marcus Bointon cde7d82391
Wrap calls to openssl_pkey_free in version checks, fixes #2178 2020-10-22 14:25:59 +02:00
Marcus Bointon 5ba587f4ac
Changelog 2020-10-18 20:05:47 +02:00
Marcus Bointon 482bdd697a
Cleanup 2020-10-18 20:03:58 +02:00
Mikhail Fesenko 0234e7e462
[POP3.php] small refactor: add constants DEBUG* like in SMTP class (#2175)
* [POP3.php] small refactor: add constants DEBUG* like in SMTP class

* [POP3] removed 'debug' field getter/setter
2020-10-18 20:03:17 +02:00
Tom Spencer f2fcf54d3a
Fix Travis CI config (#2172)
* Fix Travis CI configuration

`matrix` is an alias of `jobs` so have merged the keys

* Set missing root config `dist` and `os`
2020-10-15 14:18:47 +02:00
Marcus Bointon ca87a78b6f
Clean up travis build stages 2020-10-13 22:37:39 +02:00
Marcus Bointon ea49a5f03a
Clean up travis build stages 2020-10-13 22:33:35 +02:00
Marcus Bointon 1f96aef41e
Clean up travis build stages 2020-10-13 22:26:57 +02:00
Marcus Bointon 7fde25ae3e
Clean up travis build stages 2020-10-13 22:19:34 +02:00
Marcus Bointon d5e6f7d2b1
Clean up travis build stages 2020-10-13 15:31:02 +02:00
Marcus Bointon e5353e3c83
Switch from PHP CS fixer to phpcs and apply PSR12 reformatting 2020-10-13 15:12:00 +02:00
Marcus Bointon 22e81749ae
Switch from PHP CS fixer to phpcs and apply PSR12 reformatting 2020-10-13 15:08:42 +02:00
Marcus Bointon 282f0fc0ce
array_key_exists is clearer here 2020-10-13 12:25:21 +02:00
Marcus Bointon 9209642ca6
Oops - refix Ukrainian language code which was right before! 2020-10-13 12:24:50 +02:00
Petro-Ivvysoft 9aa8dd3bcb
Rename phpmailer.lang-uk.php to phpmailer.lang-ua.php (#2167) 2020-10-13 12:11:39 +02:00
Laurent Clouet fcd0af2910
Add missing french translations (#2166)
Fix sl translation file

Co-authored-by: Laurent Clouet <laurent.clouet@westwing.pl>
2020-10-11 22:08:32 +02:00
Blaž Oražem 9b8e1825ff
Add missing translations for Slovenian language (#2165) 2020-10-10 15:29:36 +02:00
Marcus Bointon 917ab212fa
6.1.8 2020-10-09 16:55:58 +02:00
Marcus Bointon f9373db9a5
Fix tests 2020-10-07 14:45:06 +02:00
Marcus Bointon 46fa62268e
Fix tests 2020-10-07 14:42:17 +02:00
Marcus Bointon a0dffb8876
Changelog 2020-10-07 12:36:38 +02:00
Suhayb Alghutaymil ec81d13717
Add ajax contact form (#2160)
* Add ajax contact form

* Allow ajax contact form to work if javascript is disabled.

Co-authored-by: Suhayb Alghutaymil <s@sgh.sa>
Co-authored-by: Sohib AlGotimel <sgotimel@citc.gov.sa>
2020-10-07 12:18:31 +02:00
Andreas Erhard 201aca3ff9
Add missing translations for German (#2159) 2020-10-06 15:48:50 +02:00
Ian Mustafa 625d93570e
Improve Bahasa Indonesia translation (#2158) 2020-10-06 09:35:39 +02:00
Adriane Justine Tan 80724ec8c2
Improved Filipino language (#2152) 2020-10-02 18:25:47 +02:00
Jérémy PASTOURET a4bf66a1d1
Add MailHog in the code example as a tool for testing email sending (#2151)
* Add MailHog - Testing email sending

* Add MailHog - Testing email sending
2020-10-02 11:47:38 +02:00
criri99 86d5cb060b
(-)remove branch #85-improvement/TestImprovement (+) add branch increase_code_coverage (+) add changes from old branch (#2119)
Co-authored-by: chriri99 <au000171>
2020-09-30 22:29:24 +02:00
Marcus Bointon e2e07a355e
Proposed fix for #2069 2020-09-30 19:29:00 +02:00
Marcus Bointon 59dea8ca78
Comment 2020-09-30 19:01:22 +02:00
Marcus Bointon 35c2cfa9ea
Add destination selector to contact form example 2020-09-30 19:01:03 +02:00
Marcus Bointon e78d99fb89
Changelog 2020-09-21 10:33:15 +02:00
mscdex 7851021d3e
Reset SMTP session after error with keepalive (#2138)
Fixes: https://github.com/PHPMailer/PHPMailer/issues/2137
2020-09-21 10:24:33 +02:00
Marcus Bointon 17ab94e469
Proposed fix for #2128 2020-09-07 17:04:19 +02:00
Ayesh Karunaratne 4091addf9f
Add AVIF file extension to mime list (#2130) 2020-09-03 09:27:53 +02:00
Marcus Bointon 13e9224c1e
Update copyright year 2020-09-02 08:41:14 +02:00
Marcus Bointon e7acd3d92f
CS 2020-08-05 10:34:30 +02:00
Marcus Bointon e8a7364733
Update link 2020-08-05 10:34:03 +02:00
Marcus Bointon 82f1d17511
Changelog 2020-08-04 09:47:23 +02:00
Marcus Bointon ecdf374c74
Allow local override of SMTP auth settings in tests; allows easy use of HELO (which requires a username) for local testing 2020-08-04 09:46:12 +02:00
Marcus Bointon efb0c4dcb8
Typo 2020-08-04 09:20:40 +02:00
Marcus Bointon 4bf91e98b3
Changelog 2020-08-04 09:20:09 +02:00
Marcus Bointon 4af0120eda
Note that the hash extension is required (and always has been!) or file attachments won't work 2020-08-04 09:03:04 +02:00
Marcus Bointon db03bb6c1a
Escape output on file upload messages 2020-08-04 08:51:55 +02:00
Marcus Bointon 79b5d815d6
Better error checking & reporting on file uploads 2020-08-04 08:51:48 +02:00
Marcus Bointon 90871378de
Don't set a time limit if set_time_limit is disabled, fixes #2088 2020-07-20 11:31:22 +02:00
Marcus Bointon 9ce50675c8
Add HELO link 2020-07-15 20:31:23 +02:00
elizabeth m 806531145a
Remove old links from SMTP test server suggestions (#2085)
FakeSMTP's repo is read-only and hasn't been updated since 2016, so I removed it. The link to FakeEmail's repo was pointing at a fork that also hasn't been updated since 2016, so i changed the link to one that has more activity. Also smtp4dev has been moved to Github and works on Linux, so I updated its entry to reflect that.
2020-07-15 20:27:29 +02:00
Marcus Bointon 2c2370ba3d
6.1.7 2020-07-14 20:50:27 +02:00
Marcus Bointon 8b4ee589bd
CS, minor tweaks from EA plugin 2020-07-14 20:15:45 +02:00
Marcus Bointon b07638a562
Fix assertions: they should be static calls 2020-07-14 20:15:45 +02:00
Marcus Bointon 5bb37af70d
CS 2020-07-14 20:15:45 +02:00
Marcus Bointon e12407cbe9
Undo BC break introduced in 6.1.2 2020-07-14 20:15:44 +02:00
Marcus Bointon 716f6d6a00
CS 2020-07-14 20:15:44 +02:00
Steen Schütt 37a5e0cd11
Write server banner to SMTP::$last_reply (#2083) 2020-07-13 11:36:10 +02:00
Bart Butler 8d50b49c2d
Retry stream_select if interrupted by signal (#2074)
Co-authored-by: Bart Butler <bartbutler@protonmail.com>
2020-06-29 21:50:04 +02:00
John Blackbourn 21a6071ac3
Correct a malformed `@return` tag. (#2072) 2020-06-20 12:39:58 +02:00
Marcus Bointon b3650f9f72
Fix null connection issue introduced in #2060 2020-06-11 17:12:50 +02:00
Marcus Bointon b52fd6e8ad
Add deprecated tag for SingleTo - deprecation happened in 6.0.0 2020-06-11 16:43:42 +02:00
Fabien Salathe 95a54cc986
Split SMTP::connect in 2 functions to have more flexibility (#2060) 2020-06-10 16:23:39 +02:00
Anton 2cf7123cb1
Update phpmailer.lang-sv.php (#2064)
* Korrigerat särskrivning
2020-06-09 09:31:05 +02:00
Marcus Bointon c2796cb1cb
Merge pull request from GHSA-f7hx-fqxw-rvvj
* Initial fixes, tests, and bump to 6.1.6

* Add CVE number
2020-05-27 14:24:03 +02:00
Marcus Bointon a7f1b23aae
Add funding info 2020-05-06 16:42:46 +02:00
Pierre Grimaud 5b63b3955c
Fix typos (#2037) 2020-04-26 10:31:39 +02:00
Marcus Bointon c1c38e3268
Correct Armenian language code 2020-04-17 09:25:34 +02:00
Marcus Bointon a12c95eb53
Use correct timeout property in debug output, clarify debug output, see #2018 2020-03-26 08:23:06 +01:00
Marcus Bointon a8bf068f64
6.1.5 2020-03-14 15:23:48 +01:00
Johse 2e727253d6
Rewrite and extension of translation (#1989) 2020-03-14 15:19:14 +01:00
lubosdz 55e0b34dea
Fix issue #2008 - MS Outlook corrupts formatting multipart EML files (#2009) 2020-03-09 11:21:06 +01:00
Marcus Bointon a55152fb5a
Typo fix for #2007 2020-03-05 19:24:33 +01:00
Marcus Bointon e9710eece7
Update README.md (#2004)
encouraging implicit TLS on port 465 according to RFC8314
2020-03-04 22:23:17 +01:00
Markus Staab 8666152d9f
Fix phpdoc type (#1993) 2020-02-26 20:10:35 -05:00
Marcus Bointon 26d77e0783
Changelog 2020-02-24 15:53:01 +01:00
Marcus Bointon a559852f2d
More thorough checks that attachment files are accessible, return error or throw exception if file has been deleted since adding it, fixes #1960 2020-02-24 15:49:49 +01:00
Marcus Bointon 589ec7d8f3
Access the `$smtp` instance the right way, fixes #1990 2020-02-24 15:01:57 +01:00
Marcus Bointon b8f4e4e9c2
Allow empty header values after all, rearrange tests. See #1984 2020-02-20 12:30:47 +01:00
Marcus Bointon af4c0ad322
CS 2020-02-20 12:05:01 +01:00
Marcus Bointon 416651e950
CS 2020-02-20 12:02:19 +01:00
Marcus Bointon 594fbb4182
Don't allow headers to contain breaks, fixes #1984 2020-02-20 12:01:48 +01:00
Marcus Bointon f7858d61a5
Make DKIM header list check case-insensitive, see #1975 2020-02-19 09:48:05 +01:00
Marcus Bointon 2b6fcc4036
Changelog 2020-02-17 13:51:51 +01:00
Marcus Bointon b294b44f20
DKIM tweaks (#1969)
* DKIM tweaks, see #1962, #1964, #1965

* Don't use the `l` tag in DKIM signature, fixes #1964

* CS

* CS

* Fix order of operations, see #1962

* Remove trailing line break from output of `DKIM_Add()`, see #1962
2020-02-17 12:26:58 +01:00
Marcus Bointon 6ae518109e
Ensure that even vars passed by reference are declared, fixes #1968 2020-02-17 09:26:43 +01:00
John Jago cc8da73fa2 Fix link to unit tests (#1926) 2019-12-28 11:09:55 +01:00
Marcus Bointon c5e61d0729
6.1.4 2019-12-10 12:17:38 +01:00
Marcus Bointon 30cecf76e4
Changelog 2019-12-10 12:16:20 +01:00
Patrick Kuijvenhoven 7eff728136 Feature improve host check (#1909)
* Let isValidHost() determine validness of host

- PHP way of doing so (https://github.com/php/php-src/pull/826)
- Improved and shortened regexp a bit

* Give more specific debug message in case host(entry) is invalid

* Rewrite filter_var checks

* Host [[<ipv6>]] is not valid
2019-12-10 11:48:50 +01:00
Marcus Bointon 05853dbd44
Changelog 2019-12-09 15:09:56 +01:00
Marien Fressinaud 078a5ad4d3 Add fallback to INTL_IDNA_VARIANT_2003 if needed (#1912)
INTL_IDNA_VARIANT_UTS46 exists from ICU 4.6, which has been released in
March 2011. However, some recent installations might have older ICU
versions (even with PHP 7+). In this situation `INTL_IDNA_VARIANT_UTS46`
will not exist and PHP will transform the constant into a string,
resulting in the following error:

    Warning: idn_to_ascii() expects parameter 3 to be integer, string
    given in /some/path/to/a/file.php on line XX

This commit allows to fallback to INTL_IDNA_VARIANT_2003 if it's needed
and possible. This variable is deprecated from PHP 7.2 and will be
removed in PHP 8, so we take care to test its existence as well.

References:

- https://github.com/FreshRSS/FreshRSS/pull/2680
- https://github.com/PrestaShop/PrestaShop/pull/11995
- https://wiki.php.net/rfc/deprecate-and-remove-intl_idna_variant_2003
2019-12-09 09:20:05 +01:00
Marcus Bointon ae99006c51
Avoid excessive folding unless it's really needed. 2019-12-06 11:49:16 +01:00
Marcus Bointon 3ea7a8c3e8
Enable 7.4 now it's released, shift code coverage to it 2019-12-05 10:23:17 +01:00
Marcus Bointon a25ae38e03
6.1.3 2019-11-21 10:37:46 +01:00
Marcus Bointon 2f2233b568
Changelog 2019-11-21 10:36:21 +01:00
Marcus Bointon 6244cf917f
Fix for #1683 2019-11-21 10:33:45 +01:00
Marcus Bointon c0b63f19c8
Remove stray phpdoc ref, see #1898 2019-11-20 19:58:58 +01:00
Marcus Bointon 506eff4a59
Changelog 2019-11-19 16:08:31 +01:00
Marcus Bointon dd6cf2eb51
Remove some unneeded dev dependencies, resolves conflict in #1898
Phpdocs now build using a github action
2019-11-19 16:07:01 +01:00
Marcus Bointon 4c5597c733
CS 2019-11-18 16:31:08 +01:00
Marcus Bointon 5f4fefe008
Changelog 2019-11-18 16:22:41 +01:00
Marcus Bointon 5c0af00d2c
Correct comment 2019-11-18 16:21:32 +01:00
Marcus Bointon 188cc38e2e
Use a constant to make it clear where this value comes from 2019-11-18 16:21:07 +01:00
Kirill Voronov b468ff8b4a FIX int type (#1895)
* FIX int type

* Update SMTP.php

* damn it! :)

* Update SMTP.php
2019-11-15 11:41:25 +01:00
mhdalvin 4fd3c57b2d wrong location of is_callable()'s closing parenthesis (#1890) 2019-11-14 08:50:24 +01:00
Marcus Bointon 0ae8505d26 CS 2019-11-13 21:09:28 +01:00
Marcus Bointon 526b1836c9 6.1.2 2019-11-13 20:51:46 +01:00
Marcus Bointon f39d72ba54 Changelog 2019-10-31 09:33:24 +01:00
Marcus Bointon 0d780d5091 Don't capture if attr match has hyphen prefix, see #1877 2019-10-30 22:40:36 +01:00
Marcus Bointon a7c75c6328 Make background attribute pattern match more precise, see #1877 2019-10-30 18:21:19 +01:00
Marcus Bointon 4e9a7614ce Ensure header and body are separated by 2 line breaks 2019-10-23 15:15:15 +02:00
Marcus Bointon 3d800d7e54 Revert previous incorrect change 2019-10-23 15:14:18 +02:00
Marcus Bointon ee7c65c781 Changelog 2019-10-23 14:45:48 +02:00
Marcus Bointon ae5e6fa488 Ensure there's a line break after headers, fixes #1872, #1871 2019-10-23 14:42:32 +02:00
Marcus Bointon 564f139ca6 Fix wrong var name 2019-10-20 21:24:14 +02:00
Marcus Bointon 9638812426 Changelog 2019-10-20 20:57:10 +02:00
Marcus Bointon 11e8d23927 Merge branch 'dkimrevision' 2019-10-20 20:52:30 +02:00
Marcus Bointon a038b50362 Change content-id header formatting, see #1691, #1864 2019-10-20 20:51:58 +02:00
Marcus Bointon 9282a06c8e Use shorter hashes for CID values, see #1691 2019-10-20 20:49:36 +02:00
Marcus Bointon e4123e66b4 Merge branch 'master' into dkimrevision 2019-10-20 19:37:17 +02:00
Ali Ahmad a0adbb2a7a makes slights changes to README.md (#1866) 2019-10-16 22:05:37 +02:00
Marcus Bointon 8087171624 Alter test to check UTF-8 in content-IDs, see #1691 2019-10-16 10:38:55 +02:00
Marcus Bointon 1a7387057a Only add a Content-ID header on inline attachments, see #1691 2019-10-16 10:37:19 +02:00
Marcus Bointon 3649f0697e Use HTML5 doctype and set lang attr everywhere 2019-10-16 10:09:01 +02:00
Marcus Bointon 694b911c9c
Merge remote-tracking branch 'remotes/origin/master' into dkimrevision 2019-10-14 12:18:57 +02:00
Marcus Bointon b8c44fca4e
Add test for content-id header formatting 2019-10-14 12:17:28 +02:00
Marcus Bointon 0dccabd950
Do content-id header value encoding & formatting in correct order, fixes #1864 2019-10-14 12:16:45 +02:00
Marcus Bointon 809394fee3
Don't need such long hashes for content IDs 2019-10-14 12:13:12 +02:00
Marcus Bointon 1c24788c17
Fix incorrect unfolding 2019-10-14 11:31:31 +02:00
Marcus Bointon 961e782634
Test was wrong before, even though it results in an unexpected space 2019-10-11 12:54:15 +02:00
Marcus Bointon 7320d99ee9
Fix duplicate subject, bad unfolding, excess line break, see #1860 2019-10-11 12:45:23 +02:00
Marcus Bointon 47a31a2f7f
Test fixes 2019-10-11 10:24:15 +02:00
Marcus Bointon 7153482b3c
Standards 2019-10-10 16:03:03 +02:00
Marcus Bointon aa07c8f7c7
DKIM_add rewrite, see #1860 2019-10-10 15:57:08 +02:00
Marcus Bointon f20885a9d3
Standards cleanup 2019-10-09 09:13:21 +02:00
Marcus Bointon 63344e6baa
Standards cleanup 2019-10-09 09:11:23 +02:00
Marcus Bointon 2b0a3df2a6
Standards cleanup
(cherry picked from commit 05df5e5758)
2019-10-09 08:56:44 +02:00
Marcus Bointon 05df5e5758
Standards cleanup 2019-10-09 08:54:03 +02:00
Marcus Bointon c9e4d921d4
Standards cleanup 2019-10-08 13:35:03 +02:00
Mikhail Fesenko 7480e75c70 Small refactor #hacktoberfest (#1859) 2019-10-08 07:56:10 +02:00
Marcus Bointon 8fceec772a
Remove chmod - wrong path
Also may no longer be needed with action changes.
2019-10-03 13:29:13 +02:00
freezy f2e2153a13 merge two jobs into one (#1857) 2019-10-03 13:03:58 +02:00
Marcus Bointon fb3b27b506
Try a different path 2019-10-03 13:02:02 +02:00
Marcus Bointon 4a9f7b2906
Ensure runner user can read phpdoc output 2019-10-03 12:58:33 +02:00
Marcus Bointon 3563788a86
Fix job name 2019-10-02 13:38:00 +02:00
Marcus Bointon d4daffdb55
Try to fix artifact path 2019-10-02 13:37:01 +02:00
Marcus Bointon 3651595a93
Make publishing docs depend on build succeeding 2019-10-02 13:36:05 +02:00
Marcus Bointon a56b12630b
Fix API docs link badge 2019-10-02 12:44:21 +02:00
Marcus Bointon 8be303c390
Add API docs link badge 2019-10-02 12:21:48 +02:00
Marcus Bointon 4b93ad523b
Only build docs on push to master 2019-10-02 11:20:04 +02:00
freezy c1fbe8fe50 [Fixes #1847] Building docs with GitHub Actions (#1855)
* Try building docs with GitHub Actions

* fix GH_PAT secret
2019-10-02 11:09:22 +02:00
Marcus Bointon 26bd96350b
6.1.1 2019-09-27 23:33:43 +02:00
Marcus Bointon 69892e4e06
PHPMailer 6.1.0 2019-09-27 19:42:59 +02:00
Marcus Bointon 689d243f94
CS 2019-09-27 19:15:39 +02:00
Marcus Bointon 5c7af569b4
CS 2019-09-27 19:04:00 +02:00
Marcus Bointon 268681b7e1
Update copyright 2019-09-27 18:33:36 +02:00
Marcus Bointon c0d49ac049
Consistent use of debug constants, CS 2019-09-27 18:33:36 +02:00
Marcus Bointon 698e352fe6
Readme 2019-09-27 18:33:36 +02:00
江不知 3cd175abaf Fix the problem about travis-ci. (#1848) 2019-09-27 18:14:06 +02:00
Marcus Bointon f48d768d4a
Update logo image 2019-09-26 10:57:33 +02:00
Marcus Bointon 108d6d3c9f
Changelog 2019-09-26 10:57:14 +02:00
puhr-mde de53537ba3 Cancel ICS file corrupted on Office 365 #1780 (#1842)
* Cancel ICS file corrupted on Office 365 #1780
2019-09-26 10:52:14 +02:00
Marcus Bointon 69a5403d48
Add logos 2019-09-25 14:48:26 +02:00
Marcus Bointon d51baeb98a
Remove old issue template 2019-09-25 12:42:47 +02:00
Marcus Bointon 0a5adbc40b
Comments 2019-09-25 12:40:23 +02:00
Marcus Bointon 7017d3b71e Update issue templates 2019-09-25 11:33:43 +02:00
Marcus Bointon 6106c0f29a
Changelog 2019-09-25 09:48:03 +02:00
Claas Augner 21b35dc49b Use Q-encode to wrap too long headers (#1840)
* Always Q-encode headers exceeding maximum length

Previously, headers exceeding the maximum line length without
any special characters were only folded. This lead to problems
with long filenames (#1469) and long headers in general (#1525).

Now, long headers are always Q-encoded (and still folded).

* Use ASCII as Q-encoding charset if applicable

Previously, headers were Q-encoded using the message
charset, e.g. UTF-8. This is excessive for ASCII
values, as it requires a unicode engine.

Now, we use ASCII if we only find 7-bit characters.

* Separate header encoding from encoding selection

* Use ASCII for B-encoding as well

* Refactor max line length calculation

Previously, we calculated the maximum
line length for header encoding both
for B- and Q-encoding, even though
they share the same limits.

Now, we calculate these once for both.
2019-09-25 08:58:44 +02:00
Marcus Bointon a4f6fe3879
Changelog 2019-09-24 12:39:14 +02:00
Marcus Bointon 8414097b86
Use constants more consistently 2019-09-24 12:38:51 +02:00
Marcus Bointon ed901561d5
Add encryption constants 2019-09-24 12:14:53 +02:00
Marcus Bointon 18272f02df
Changelog 2019-09-24 10:32:58 +02:00
christiandavilakoobin 3c1c6e0360 Fixed signing emails with pck7. (#1837) 2019-09-20 17:44:07 +02:00
Mohammad Hossein Mojtahedi dbaf95c781 Update the translation for Persian/Farsi (#1832)
Include the last string (`extension_missing`) in Persian translation.
2019-09-13 23:12:46 +02:00
Marcus Bointon 2d1ab8e07c
Standards 2019-09-02 19:58:06 +02:00
Marcus Bointon a0ab65d0dc
Revise DKIM header canonicalisation, see #1525 2019-09-02 19:44:12 +02:00
Marcus Bointon 7c28398ccc
More for #1801 2019-09-01 14:56:45 +02:00
Marcus Bointon bb1fe07b28
Typo. 2019-09-01 13:52:47 +02:00
Marcus Bointon bebd718f4d
Try to help #1801 2019-09-01 13:35:09 +02:00
Marcus Bointon b8e6a92d41
Drop PHP 5.5 from CI config as it's no longer supported by Travis-CI 2019-08-02 22:30:58 +02:00
Marcus Bointon 516e073dd6
Changelog 2019-07-30 18:29:02 +02:00
Marcus Bointon 12c4f0a85a
Add more error checking to mailing list example 2019-07-30 18:26:19 +02:00
Marcus Bointon e67f1e6d91
Clarify readme change 2019-07-24 16:35:42 +02:00
dturner123 db4de4eb00 Update README.md (#1790)
Add guidance specifically regarding the use of Clear* functions when re-using the instance e.g. in a mailing list.
2019-07-24 15:29:06 +01:00
Andrey Bolonin 82a578e942 add php 7.4snapshot (#1779) 2019-07-14 14:08:12 +01:00
Przemysław Dąbek 6c74e4b33f Strict check XMailer with empty string (#1764) 2019-07-02 20:51:00 +02:00
Marcus Bointon 511413a6ea Fix for #1753. This bug was introduced in 7932f2de8c, so was never in a tagged release. 2019-06-05 15:16:33 +02:00
Marcus Bointon 8ea801b479
Update changelog.md
Changelog
2019-06-05 09:32:12 +02:00
Donovan Renato Fourie 4c34786b71 Create phpmailer.lang-af.php (#1752)
* Create phpmailer.lang-af.php

Afrikaans PHPMailer language file this can be easily verified using google translate except 'connect_host' => 'SMTP-fout: kon nie aan SMTP-gasheer koppel nie.', which is better said like 'SMTP-fout: kon nie aan SMTP-verbind nie.'

* Update phpmailer.lang-af.php
2019-06-05 09:30:30 +02:00
Marcus Bointon a990e832c0
Create FUNDING.yml 2019-05-30 01:06:24 +02:00
Marcus Bointon 92da4ab334
Don't need case insensitivity, don't need to escape . in char classes 2019-05-27 21:34:34 +02:00
Marcus Bointon cb2179828a
Use locale-safe basename function everywhere, fixes #1736 2019-05-27 21:33:40 +02:00
Marcus Bointon 463ccbbf16
Standards 2019-05-27 21:26:41 +02:00
Marcus Bointon 7932f2de8c
Standards 2019-05-27 21:23:21 +02:00
Marcus Bointon e86a4274a5
More consistent use of exceptions for encoding errors
Test coverage for the same
See #1733
Coding standards
2019-05-27 17:09:48 +02:00
Aleksey Kuznetsov 1009fd6feb Update phpmailer.lang-ru.php (#1739) 2019-05-27 09:11:21 +02:00
Aleksey Kuznetsov 573b644dfd Update phpmailer.lang-uk.php (#1738) 2019-05-27 08:39:34 +02:00
Marcus Bointon abaee17daa
Add encoding validator
Add exceptions and make return values consistent when requesting an invalid encoding in any attachment method
2019-05-24 22:47:25 +02:00
Marcus Bointon b70b6eec07
Changelog 2019-05-24 10:49:48 +02:00
Marcus Bointon 2617dfabd9
Throw an exception on invalid encoding, see #1733 2019-05-24 10:48:50 +02:00
Damien Regad 75e0a5ce3f Update composer license to `LGPL-2.1-only` (#1719)
As per SPDX License List, previously used `LGPL-2.1` is deprecated[1].

[1]: https://spdx.org/licenses/LGPL-2.1.html
2019-05-05 20:14:21 +02:00
Marcus Bointon 3d71323416
Use ; to separate multiple params in MIME headers, see #1714 & #1705 2019-04-27 18:43:00 +02:00
Marcus Bointon c614717a7e
Test for double quotes in from name 2019-04-26 18:40:54 +02:00
Marcus Bointon 6b36cba90b
Adjust tests for previous commit 2019-04-26 18:38:11 +02:00
Marcus Bointon 12e13f5edd
Use spaces instead of tabs for header folding - some clients don't handle tabs properly 2019-04-26 18:31:05 +02:00
Marcus Bointon 0dc4706dc7
Standards 2019-04-25 18:25:53 +02:00
Marcus Bointon 7cfef991e5
Changelog 2019-04-25 17:32:26 +02:00
Marcus Bointon 50992bf084
Add support for [RFC2387 child element content-type hint](https://tools.ietf.org/html/rfc2387#section-3.1) in multipart/related structures 2019-04-17 10:42:28 +02:00
Km.Van fc8c727f38 Adjust the format for better readability (#1687)
Adjust the format for better readability
2019-03-18 13:07:30 -04:00
fabriciohd ba148d590e Alteração apenas para motivo de estudo rs (#1688) 2019-03-18 08:29:44 -04:00
Damien Regad 76c6b4c0a7 PHPDoc: add missing @throws tags (#1680)
addOrEnqueueAnAddress() throws a PHPMailer\Exception, but addAddress(),
addCC(), addBCC() and addReplyTo() are neither catching it nor
indicating that they are throwing it.

This causes IDE inspections to flag a warning.
2019-03-05 13:45:40 +01:00
tajrij kawakibi a55c3281a1 fixed catching detail enhanced error code (#1668) 2019-02-21 08:51:58 +01:00
Carlos Marin Ugalde 258931af90 DSN suppot added (#1554)
* DSN suppot added

* Added test for code coverage of dsn support
Added link for RFC3461 for property $dsn documentation

* Updated coding style
2019-02-15 10:08:43 +01:00
Marcus Bointon 522e4c14eb
Use current PHP for code coverage 2019-02-15 09:47:15 +01:00
Marcus Bointon 9a5e333b24
Allow nightly and hhvm failures 2019-02-15 09:45:57 +01:00
Marcus Bointon d364545e8f
Standards 2019-02-15 09:28:12 +01:00
Gratusfr 032b8162db php://temp streams instead of temp files (#1585)
* php://temp streams instead of temp files

@TODO would be nice to use php://temp streams here > done

* remove space

* Update PHPMailer.php

remove space
2019-02-15 09:22:50 +01:00
Oliver Smith 06a74eeea9 corrected 'imap_getmailboxes' comment to include third parameter (#1663) 2019-02-15 09:11:12 +01:00
Marcus Bointon 0c41a36d45
6.0.7 2019-02-01 16:04:28 +01:00
Richard Fontana cb62fd762f Add GPL Cooperation Commitment (#1644) 2019-02-01 15:59:20 +01:00
Shoko Ishigaki 7582514b36 Update the language directory path (#1639) 2019-02-01 15:38:17 +01:00
Nawawi Jamili e134a4060b Updated: malaysian translation (#1617) 2019-02-01 15:37:10 +01:00
Marcus Bointon d065cd74b6
Don't exclude composer.json from exports 2019-01-20 15:49:55 +01:00
Pascal 481715d711 Fixed typo (#1621) 2018-12-17 15:48:41 +01:00
Jim Jagielski 028aceea3d Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2018-11-16 08:18:48 -05:00
Marcus Bointon 8190d73eb5
Standards 2018-11-16 01:41:32 +01:00
Marcus Bointon dec25e8b6e
Standards 2018-11-16 01:35:56 +01:00
Marcus Bointon 76e08791ba
6.0.6 2018-11-15 23:37:37 +01:00
Marcus Bointon 77c26cdf18
Use debug level constants 2018-11-15 23:37:32 +01:00
Marcus Bointon 8e653bb796
Mitigations for CVE-2018-19296 2018-11-15 23:37:18 +01:00
Marcus Bointon 0ed33daab6
Merge Serbian translation changes, fix incorrect ISO639 code and mapping, see #1598 2018-11-14 16:06:01 +01:00
Jim Jagielski 3544703cc4 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2018-11-14 07:48:14 -05:00
Miloš Milanović cd15e050a4 Add Serbian translation (#1598) 2018-11-14 13:16:31 +01:00
Jim Jagielski 2e1a669d70 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2018-11-12 08:12:15 -05:00
Gabriel Caruso 04723d0a14 Remove unecessary cast (#1595) 2018-11-11 16:36:34 +01:00
Gabriel Caruso 43b774272b Use dedicated assertContains assertion (#1594) 2018-11-11 16:34:54 +01:00
Jim Jagielski cf58579543 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2018-11-05 08:15:17 -05:00
miyama c482b20724 Improve tests (#1575)
* [fix] fix test cas

fix test case

- testBCCAddressing

* [fix] fix test case testSmtpConnect

* [fix] improve test case about coverage

* [fix] invalid address

* [add] test case for setSMTPInstance

* [add] Add OAuth test case

* [add] createbody test case added

* [add] add case validateaddress test

* [add] attachmentExists test case

* [add] add test case getMailMIME

* [fix] remove not need line

* [fix] fix codes for github comment

* [fix] fix code style for travis.

* [fix] fix code style for travis.

* [fix] fix code style for travis.

* [fix] fix code style for travis.

* [fix] fix code style for travis.

* [fix] fix miss type.

* [fix] fix test case of testMailSend

* [fix] fix test case of testSmtpConnect

* [fix] remove not needed line.

* [fix] remove not need space.

* [fix] fix test case of sendMail

* [fix] fix test case

* [fix] fix test case smtpconnect

* [fix] fix test case of smtpconnect

* [fix] fix test case of smtpconnect

* [fix] fix test case of smtpconnect
2018-11-04 18:20:06 +01:00
Jim Jagielski cb4e2ae675 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2018-10-30 06:28:22 -04:00
Zdeněk Večeřa 3c90248c01 Update DKIM_sign.phps (#1521) 2018-10-30 08:40:02 +01:00
Dima Hereha f61707c9e7 Update phpmailer.lang-uk.php (#1553)
Fix translation
2018-10-30 08:37:51 +01:00
Andrey Bolonin b94193c039 add php 7.3 to travis (#1589) 2018-10-30 08:36:21 +01:00
Jim Jagielski 0fda1bff77 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2018-10-16 07:16:57 -04:00
Yousef Sultan bded7e325b Fix missing Arabic translations (#1577)
* Translate extension_missing in Arabic locale

Signed-off-by: Yousef Sultan <yousef.su.2000@gmail.com>

* uhh

Signed-off-by: Yousef Sultan <yousef.su.2000@gmail.com>
2018-10-16 08:54:01 +02:00
Jim Jagielski c65a8ed1ca Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2018-10-10 07:51:33 -04:00
Dmitriy Olshevskiy f8f90ae6bb PHPMailer.php: replace string 'utf-8' with constant CHARSET_UTF8 (#1567) 2018-10-06 21:23:04 +02:00
Jim Jagielski 90aed0bab5 Merge branch 'master' of https://github.com/jimjag/PHPMailer 2018-10-04 14:02:33 -04:00
Jim Jagielski c3e36abf34 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2018-10-04 14:02:32 -04:00
Jim Jagielski 0aee61ed70 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2018-10-03 10:13:16 -04:00
Marcus Bointon a8dce4721d
Changelog 2018-10-02 19:09:29 +02:00
Peter Orlický e56c88f80a Update Slovak translation (#1560) 2018-10-02 19:08:30 +02:00
Jim Jagielski 73ba77ef8b Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2018-10-01 09:42:14 -04:00
Marcus Bointon 110f577ec4
Changelog 2018-09-30 23:04:41 +02:00
Piyush Jha 0007a6159a Create phpmailer.lang-mg.php (#1555) 2018-09-30 22:29:45 +02:00
Jim Jagielski 197032d211 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2018-09-29 08:44:43 -04:00
Marcus Bointon 18dbc75792
Changelog 2018-09-26 19:40:58 +02:00
Marcus Bointon 9e81b00c2f
Add BC fix for renamed Tagalog language 2018-09-26 19:39:29 +02:00
Wyatt O'Day 8f558ec053 Fix warning under PHP 7.3.x+: filter_var(): explicit use of FILTER_FLAG_SCHEME_REQUIRED and FILTER_FLAG_HOST_REQUIRED is deprecated. (#1551)
FILTER_VALIDATE_URL already checks the host, thus no need to explicitly pass FILTER_FLAG_HOST_REQUIRED (hence the warning).
2018-09-26 18:46:46 +02:00
Jim Jagielski 5bb60e2af4 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2018-09-21 08:35:55 -04:00
Filip Š 6ba5bc519b Update Slovenian translation (#1546) 2018-09-20 15:14:35 +02:00
Jim Jagielski 9ffde9e547 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2018-09-12 10:03:18 -04:00
Stefano 9752980555 Update phpmailer.lang-it.php (#1543) 2018-09-11 20:32:29 +02:00
Jim Jagielski d75a1c3807 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2018-08-27 12:05:06 -04:00
aleskr 83faa53556 More understandable message. (#1499) 2018-08-24 17:35:38 +02:00
Marcus Bointon 21d6d61231
Revert "Avoid using deprecated ini value in PHP >= 7.2, fixes #1527"
This reverts commit 8b35fb9147.
2018-08-24 16:56:22 +02:00
Marcus Bointon 8b35fb9147
Avoid using deprecated ini value in PHP >= 7.2, fixes #1527 2018-08-24 16:46:57 +02:00
Marcus Bointon ebd510037b
Changelog 2018-08-24 16:46:57 +02:00
Jim Jagielski 6f169cf36b Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2018-08-03 15:33:17 -04:00
Briggs Elsperger 59495db0b1 Fixes Typo (#1514) 2018-08-02 22:46:56 +02:00
Jim Jagielski 33e6da8443 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2018-07-01 09:34:22 -04:00
Toto Prayogo 8324bf8816 Update phpmailer.lang-id.php (#1215)
* Update phpmailer.lang-id.php

* Consistent caps
2018-06-27 11:14:57 +02:00
Marco Muths 5c9d3c5484 Add flag for using copiedHeaderFields and config for using extra headers in DKIM signature (#1468)
* Changed in DKIM signature

- Add flag for using copiedHeaderFields
- config for using extra headers in DKIM signature

* Cleanups after Review

- Don't use masked ampersands in url
- Remove test related artifacts after run

* Complete docs
2018-06-26 17:04:38 +02:00
Marcus Bointon 46869d46b9
Add missing Hungarian translation, thanks to Fábián Gábor 2018-06-25 11:22:50 +02:00
Jim Jagielski 141e1e9c7d Merge branch 'master' of https://github.com/jimjag/PHPMailer 2018-06-20 11:15:40 -04:00
Jim Jagielski 34cb106597 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2018-06-20 11:15:39 -04:00
Jim Jagielski 52be836f78 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2018-06-16 10:23:16 -04:00
Marcus Bointon 7f7baf5436
Update ISSUE_TEMPLATE.md 2018-06-11 16:32:06 +02:00
Jim Jagielski 743cba5d07 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2018-05-29 08:02:57 -04:00
Adriane Justine Tan ef62353d07 New language ang updated README.md (#1464)
* Create new language file: Tagalog (Philippines)

* Rename phpmailer.lang-tg.php to phpmailer.lang-tl.php

* Update README.md

Change 47 to 48 languages
2018-05-28 18:11:23 +02:00
Jim Jagielski 7ae22574f8 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2018-05-18 08:33:56 -04:00
Marcus Bointon d145514f10
Add Campaign Monitor transaction ID pattern
Prefer \d to 0-9 in regexes
2018-05-17 09:37:33 +02:00
Jim Jagielski 2c86083b7b Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2018-04-27 09:15:59 -04:00
Maximilian Beckers bbdfa96b95 Add mail header constants, fixes #1428 (#1429)
* add mail header constants, fixes #1428
2018-04-27 10:25:28 +02:00
Jim Jagielski 262705fd90 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2018-04-04 08:18:24 -04:00
Victualia // Loquere ce9b49b825 Added extension_missing (#1403) 2018-04-04 03:35:59 -04:00
Jim Jagielski 81572b12d0 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2018-03-27 11:48:51 -04:00
Marcus Bointon cb3ea134d4
6.0.5 2018-03-27 15:49:45 +02:00
Jim Jagielski 4e32baff78 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2018-03-27 08:57:15 -04:00
Marcus Bointon 3050a4ae75
6.0.4 2018-03-27 11:55:57 +02:00
Marcus Bointon 54ab7a754d
Changelog 2018-03-27 11:54:12 +02:00
Marcus Bointon ddb8eebf1e
Clarify auth method debug output 2018-03-27 11:51:56 +02:00
notian 58fa10db27 Updated default language path (#1390)
* Updated default language path

* Calculated path instead of building string version

* Removed whitespace in function call
2018-03-26 13:03:10 -04:00
Jim Jagielski eded594d18 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2018-03-21 12:39:03 -04:00
Marcus Bointon 4fd6207768
Fix for #1361 2018-03-21 14:39:59 +01:00
Jim Jagielski 6da6d40a80 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2018-03-19 08:13:00 -04:00
Niklas d7a4babcfd Readme composer (#1378)
* Link to Composer's site and capitalise the Composer name

* Removes odd line break
2018-03-16 07:26:12 -04:00
Jim Jagielski 9f1fac5a9c Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2018-01-16 07:45:46 -05:00
Marcus Bointon 63e2c71ea1
Changelog 2018-01-15 15:04:43 +01:00
Yash Karanke 8ec3dc9876 Hindi translations for php mailer (#1331)
* Hindi translations for php mailer

I directly uploaded to GitHub, because my fork is a legacy version now and I am having merge conflicts now

* updated hindi language

updated last missing translation and removed comment
2018-01-15 15:01:54 +01:00
Marcus Bointon 2834867b0f
Minor output cleanup, implements same as #1290 2018-01-15 14:26:53 +01:00
Jim Jagielski dbd67bfd7c Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2018-01-15 07:54:22 -05:00
dknacht 2a1dc5ce2e Update README.md (#1292)
* Update README.md

Added links to the recommended optional libraries.
Changed order of "Upgrading from 5.2" and "Legacy versions", i think this way is more logical to read.
Updated language quantity in the "Localization" section.

* Update README.md

Corrected review

* Update README.md

* Update phpmailer.lang-es.php

Added missing point to make grammatically correct and consistent with the other translations.
2018-01-15 11:42:49 +01:00
Jim Jagielski 784d5e23f8 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2018-01-11 09:21:20 -05:00
Marcus Bointon da9fede584
Changelog 2018-01-11 00:29:45 +01:00
Marcus Bointon 978d97e370
Add some modern MIME types 2018-01-11 00:24:40 +01:00
Jim Jagielski dea95a4e60 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2018-01-05 10:22:29 -05:00
Jim Jagielski 7168b0a361 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2017-12-22 11:03:38 -05:00
Jim Jagielski 4f62497920 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2017-12-12 13:50:56 -05:00
Jim Jagielski 508e3ffa15 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2017-12-01 09:48:39 -05:00
Jim Jagielski 68f7d5570d Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2017-11-30 11:54:28 -05:00
Jim Jagielski 42f6b65c55 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2017-11-17 12:30:44 -05:00
Jim Jagielski 51c2ec5e49 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2017-11-15 16:42:49 -05:00
Jim Jagielski 241497f141 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2017-11-06 07:01:31 -05:00
Jim Jagielski e03ba97962 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2017-10-30 18:54:06 -04:00
Jim Jagielski 03734f9ae3 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2017-10-19 09:06:52 -04:00
Jim Jagielski 565e65a5d6 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2017-10-16 08:11:09 -04:00
Jim Jagielski 19fd4af8a0 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2017-10-10 09:58:08 -04:00
Jim Jagielski 00387eeaaf Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2017-10-09 09:53:11 -04:00
Jim Jagielski 98b4ee6676 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2017-10-06 15:42:10 -04:00
Jim Jagielski 6c6651d0a1 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2017-09-30 14:20:59 -04:00
Jim Jagielski 9c30c65c59 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2017-09-18 05:48:39 -04:00
Jim Jagielski dd548ca002 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2017-09-15 07:41:51 -04:00
Jim Jagielski 542d32a15e Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2017-09-08 17:48:28 -04:00
Jim Jagielski 09f154b95d Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2017-09-08 09:45:37 -04:00
Jim Jagielski eb20c69485 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2017-09-05 07:36:46 -04:00
Jim Jagielski 3481253cb7 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2017-08-29 10:15:54 -04:00
Jim Jagielski e061d4c3b3 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2017-08-28 06:42:25 -04:00
Jim Jagielski 46cdb4bccb Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2017-08-14 07:33:09 -04:00
Jim Jagielski 6ec3ffb83e Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2017-08-11 09:44:16 -04:00
Jim Jagielski 417083da0b Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2017-08-02 13:23:08 -04:00
Jim Jagielski b44c3f91be Merge branch 'master' of https://github.com/jimjag/PHPMailer 2017-07-30 10:16:19 -04:00
Jim Jagielski 44966f6148 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2017-07-30 10:16:18 -04:00
Jim Jagielski 13e14f183c Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2017-07-26 17:54:37 -04:00
Jim Jagielski d450d93cc1 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2017-06-21 11:41:07 -04:00
Jim Jagielski d3643892cd Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2017-06-13 12:04:47 -04:00
Jim Jagielski 3e796acee4 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2017-05-31 18:04:35 -04:00
Jim Jagielski fcab9a98a3 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2017-03-06 18:17:16 -05:00
Jim Jagielski 30a7d46348 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2017-03-06 11:57:14 -05:00
Jim Jagielski c6ab11904a Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2017-03-02 16:14:36 -05:00
Jim Jagielski dac80f2368 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2017-03-02 06:25:09 -05:00
Jim Jagielski 4b15adf6fc Merge branch 'master' of https://github.com/jimjag/PHPMailer 2017-02-06 06:53:32 -05:00
Jim Jagielski d7e2b19de2 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2017-02-06 06:53:31 -05:00
Jim Jagielski d170e6f1aa Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2017-02-02 08:29:40 -05:00
Jim Jagielski 65532b827b Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2017-01-26 13:03:11 -05:00
Jim Jagielski 9153759178 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2017-01-09 09:11:54 -05:00
Jim Jagielski d3f6fbe67f Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2017-01-03 07:59:31 -05:00
Jim Jagielski bdce67344c Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2016-12-29 09:45:42 -05:00
Jim Jagielski a483f46352 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2016-12-28 11:01:12 -05:00
Jim Jagielski e4b690d4e1 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2016-12-28 09:37:31 -05:00
Jim Jagielski 08d5acfb67 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2016-12-28 08:35:45 -05:00
Jim Jagielski e0e5ff52d0 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2016-12-27 15:33:07 -05:00
Jim Jagielski 4273de78d3 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2016-12-26 16:47:03 -05:00
Jim Jagielski 81606215f0 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2016-12-25 10:17:24 -05:00
Jim Jagielski 65eafd3b95 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2016-12-19 09:33:13 -05:00
Jim Jagielski e7bdd92d19 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2016-12-09 08:13:44 -05:00
Jim Jagielski 9e3dc15331 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2016-11-20 08:15:58 -05:00
Jim Jagielski ff28b4ff1a Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2016-11-09 10:34:42 -05:00
Jim Jagielski 698ed1ca43 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2016-10-28 15:56:31 -04:00
Jim Jagielski a160567177 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2016-10-20 16:27:58 -04:00
Jim Jagielski e611b7c343 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2016-10-17 13:38:21 -04:00
Jim Jagielski a44277709d Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2016-10-04 14:32:51 -04:00
Jim Jagielski f9368982aa Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2016-10-03 13:10:43 -04:00
Jim Jagielski 454338d892 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2016-09-21 12:18:12 -04:00
Jim Jagielski 2f34b99ab6 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2016-09-19 09:06:12 -04:00
Jim Jagielski fd9501ce66 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2016-09-17 10:48:35 -04:00
Jim Jagielski cd899c7696 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2016-09-07 07:38:58 -04:00
Jim Jagielski 20387bb3c3 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2016-08-30 07:32:59 -04:00
Jim Jagielski af7655c4a3 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2016-08-10 16:59:59 -04:00
Jim Jagielski da7dc8b99d Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2016-07-31 14:20:20 -04:00
Jim Jagielski 2b231cf8cf Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2016-07-22 07:36:16 -04:00
Jim Jagielski a5df55de53 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2016-07-08 09:18:22 -04:00
Jim Jagielski e10fc204db Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2016-07-07 07:01:44 -04:00
Jim Jagielski c528743279 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2016-06-29 07:30:45 -04:00
Jim Jagielski 44a71e4659 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2016-06-06 07:38:09 -04:00
Jim Jagielski e99618701c Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2016-06-03 07:42:27 -04:00
Jim Jagielski 0bad16ece5 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2016-05-23 11:14:51 -04:00
Jim Jagielski 74db8a202a Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2016-05-15 09:45:38 -04:00
Jim Jagielski 33fdd0bb46 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2016-05-09 11:54:15 -04:00
Jim Jagielski 84fcf44ecf Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2016-04-28 07:36:32 -04:00
Jim Jagielski f27434e343 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2016-04-25 06:54:18 -04:00
Jim Jagielski b79bda64fe Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2016-04-17 09:03:11 -04:00
Jim Jagielski 95020edae9 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2016-04-12 06:33:45 -04:00
Jim Jagielski 215b484baf Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2016-04-08 11:31:37 -04:00
Jim Jagielski 9e986e6cfb Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2016-04-02 08:36:10 -04:00
Jim Jagielski 309538abaf Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2016-03-23 07:40:54 -04:00
Jim Jagielski f90032df3c Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2016-03-18 16:03:28 -04:00
Jim Jagielski 12bb78caa3 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2016-02-10 09:28:15 -05:00
Jim Jagielski 3898ece755 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2016-02-01 13:38:40 -05:00
Jim Jagielski f059495d97 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2016-01-30 09:28:01 -05:00
Jim Jagielski b91826e917 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2016-01-29 10:13:12 -05:00
Jim Jagielski 164b5d19c0 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2016-01-28 09:59:42 -05:00
Jim Jagielski 83a1230a96 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2016-01-07 15:24:51 -05:00
Jim Jagielski 08a14319bf Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2015-12-28 07:57:05 -05:00
Jim Jagielski a7305fe316 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2015-12-25 20:53:55 -05:00
Jim Jagielski f3f25fb66d Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2015-12-22 07:07:50 -05:00
Jim Jagielski b8f4b6d313 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2015-12-18 07:59:21 -05:00
Jim Jagielski 411b0e7ab6 Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2015-12-08 08:10:16 -05:00
Jim Jagielski 988f51bc4c Merge branch 'master' of https://github.com/PHPMailer/PHPMailer 2015-11-25 11:54:34 -05:00
Jim Jagielski 099dedad3c Merge pull request #1 from PHPMailer/master
mer
2014-12-02 14:18:08 -05:00
192 changed files with 14395 additions and 4350 deletions

21
.codecov.yml Normal file
View File

@ -0,0 +1,21 @@
codecov:
notify:
after_n_builds: 2
coverage:
round: nearest
# Status will be green when coverage is between 70 and 100%.
range: "70...100"
status:
project:
default:
threshold: 2%
paths:
- "src"
patch:
default:
threshold: 0%
paths:
- "src"
comment: false

15
.editorconfig Normal file
View File

@ -0,0 +1,15 @@
root = true
[*]
charset = utf-8
indent_size = 4
indent_style = space
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
trim_trailing_whitespace = false
[*.{yml,yaml}]
indent_size = 2

8
.gitattributes vendored
View File

@ -1,17 +1,17 @@
* text=auto
/.codecov.yml export-ignore
/.editorconfig export-ignore
/.gitattributes export-ignore
/.github export-ignore
/.gitignore export-ignore
/.phan export-ignore
/.php_cs export-ignore
/.scrutinizer.yml export-ignore
/.travis.yml export-ignore
/changelog.md export-ignore
/composer.json export-ignore
/docs export-ignore
/examples export-ignore
/phpcs.xml.dist export-ignore
/phpdoc.dist.xml export-ignore
/phpunit.xml.dist export-ignore
/test export-ignore
/travis.phpunit.xml.dist export-ignore
/UPGRADING.md export-ignore

6
.github/FUNDING.yml vendored Normal file
View File

@ -0,0 +1,6 @@
# These are supported funding model platforms
github: Synchro
patreon: marcusbointon
tidelift: "packagist/phpmailer/phpmailer"
custom: https://marcus.bointon.com/donations/

View File

@ -1,10 +1,20 @@
---
name: Bug report
about: If you've found a bug in PHPMailer, this is the right place to report it
title: ''
labels: ''
assignees: ''
---
Please check these things before submitting your issue:
- [ ] *Read the error message* you're seeing - it often tells you what is wrong, and may contain useful links & instructions
- [ ] Make sure you're using the latest version of PHPMailer
- [ ] Check that your problem is not dealt with in [the troubleshooting guide](https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting), especially if you're having problems connecting to Gmail or GoDaddy
- [ ] Include sufficient code to reproduce your problem
- [ ] If you're having an SMTP issue, include the debug output generated with `SMTPDebug = 2` set
- [ ] If you have a question about how to use PHPMailer (rather than reporting a bug in it), tag a question on Stack Overflow with `phpmailer`, but [**search first**](http://stackoverflow.com/questions/tagged/phpmailer)!
- [ ] If you have a question about how to use PHPMailer (rather than reporting a bug in it), tag a question on Stack Overflow with `phpmailer`, but [**search first**](https://stackoverflow.com/questions/tagged/phpmailer)!
# Problem description

View File

@ -1,6 +0,0 @@
Before submitting your pull request, check whether your code adheres to PHPMailer
coding standards by running the following command:
`./vendor/bin/php-cs-fixer --diff --dry-run --verbose fix `
And committing eventual changes. It's important that this command uses the specific version of php-cs-fixer configured for PHPMailer, so run `composer install` within the PHPMailer folder to use the exact version it needs.

15
.github/actions/build-docs/Dockerfile vendored Normal file
View File

@ -0,0 +1,15 @@
FROM phpdoc/phpdoc
LABEL "repository"="https://github.com/PHPMailer/PHPMailer"
LABEL "com.github.actions.name"="Build Docs"
LABEL "com.github.actions.description"="Build Docs with phpDocumentor"
LABEL "com.github.actions.icon"="file-text"
LABEL "com.github.actions.color"="blue"
# don't show errors
RUN echo "display_errors = Off" > $PHP_INI_DIR/conf.d/errors.ini
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]

5
.github/actions/build-docs/entrypoint.sh vendored Executable file
View File

@ -0,0 +1,5 @@
#!/bin/sh
set -eu
/opt/phpdoc/bin/phpdoc

21
.github/dependabot.yml vendored Normal file
View File

@ -0,0 +1,21 @@
# Dependabot configuration.
#
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "cron"
cronjob: "10 22 5,20 * *" # At 22:10, every 5th and 20th day of the month.
open-pull-requests-limit: 5
commit-message:
prefix: "GH Actions:"
groups:
action-runners:
applies-to: version-updates
update-types:
- "minor"
- "patch"

30
.github/workflows/docs.yaml vendored Normal file
View File

@ -0,0 +1,30 @@
name: Docs
on:
push:
branches:
- master
permissions: {}
jobs:
build_and_publish:
permissions:
contents: write # to push changes in repo (jamesives/github-pages-deploy-action)
name: Build and publish Docs
runs-on: ubuntu-latest
if: github.repository == 'PHPMailer/PHPMailer'
steps:
- name: Checkout sources
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
fetch-depth: 1
persist-credentials: false
- name: Build Docs
uses: ./.github/actions/build-docs
- name: Publish Docs to gh-pages
uses: JamesIves/github-pages-deploy-action@9d877eea73427180ae43cf98e8914934fe157a1a # v4.7.6
with:
branch: gh-pages
folder: docs
env:
BUILD_DIR: docs/
GH_PAT: ${{ secrets.GH_PAT }}

61
.github/workflows/scorecards.yml vendored Normal file
View File

@ -0,0 +1,61 @@
name: Scorecards supply-chain security
on:
# Only the default branch is supported.
branch_protection_rule:
schedule:
- cron: '39 20 * * 1'
push:
branches: [ "master" ]
permissions: {}
jobs:
analysis:
# Don't run the cron job on forks.
if: ${{ github.event_name != 'schedule' || github.event.repository.fork == false }}
name: Scorecards analysis
runs-on: ubuntu-latest
permissions:
# Required when publishing results (badge / API / code scanning)
security-events: write
id-token: write
steps:
- name: "Checkout code"
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- name: "Run analysis"
uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
with:
results_file: results.sarif
results_format: sarif
# (Optional) Read-only PAT token. Uncomment the `repo_token` line below if:
# - you want to enable the Branch-Protection check on a *public* repository, or
# - you are installing Scorecards on a *private* repository
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat.
# repo_token: ${{ secrets.SCORECARD_READ_TOKEN }}
# Publish the results for public repositories to enable scorecard badges. For more details, see
# https://github.com/ossf/scorecard-action#publishing-results.
# For private repositories, `publish_results` will automatically be set to `false`, regardless
# of the value entered here.
publish_results: true
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: SARIF file
path: results.sarif
retention-days: 5
# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # v4.31.9
with:
sarif_file: results.sarif

237
.github/workflows/tests.yml vendored Normal file
View File

@ -0,0 +1,237 @@
name: "Tests"
on:
push:
pull_request:
# Allow manually triggering the workflow.
workflow_dispatch:
permissions: {}
jobs:
coding-standard:
runs-on: ubuntu-22.04
name: Coding standards
permissions:
contents: read # to fetch code (actions/checkout)
steps:
- name: Check out code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- name: Set up PHP
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # 2.36.0
with:
php-version: 'latest'
coverage: none
tools: cs2pr
# Install dependencies and handle caching in one go.
# @link https://github.com/marketplace/actions/install-php-dependencies-with-composer
- name: Install Composer dependencies
uses: "ramsey/composer-install@3cf229dc2919194e9e36783941438d17239e8520" # 3.1.1
with:
# Bust the cache at least once a month - output format: YYYY-MM.
custom-cache-suffix: $(date -u "+%Y-%m")
- name: Check coding standards
id: phpcs
run: ./vendor/bin/phpcs -s --report-full --report-checkstyle=./phpcs-report.xml
- name: Show PHPCS results in PR
if: ${{ always() && steps.phpcs.outcome == 'failure' }}
run: cs2pr ./phpcs-report.xml
lint:
runs-on: ubuntu-22.04
strategy:
matrix:
php: ['5.5', '7.2', '8.0', '8.5']
experimental: [false]
include:
- php: 'nightly'
experimental: true
name: "Lint: PHP ${{ matrix.php }}"
continue-on-error: ${{ matrix.experimental }}
permissions:
contents: read # to fetch code (actions/checkout)
steps:
- name: Checkout code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- name: Install PHP
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # 2.36.0
with:
php-version: ${{ matrix.php }}
ini-values: error_reporting=-1, display_errors=On, display_startup_errors=On
coverage: none
tools: cs2pr
# Install dependencies and handle caching in one go.
# @link https://github.com/marketplace/actions/install-php-dependencies-with-composer
- name: Install Composer dependencies
uses: "ramsey/composer-install@3cf229dc2919194e9e36783941438d17239e8520" # 3.1.1
with:
# Bust the cache at least once a month - output format: YYYY-MM.
custom-cache-suffix: $(date -u "+%Y-%m")
- name: Lint against parse errors
if: ${{ matrix.php != 'nightly' }}
run: composer lint -- --checkstyle | cs2pr
- name: Lint against future parse errors (PHP nightly)
if: ${{ matrix.php == 'nightly' }}
run: composer lint
test:
needs: ['coding-standard', 'lint']
runs-on: ubuntu-22.04
strategy:
matrix:
php: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
extensions: ['optimal', 'minimal']
coverage: [false]
experimental: [false]
include:
# Run code coverage on high/low PHP.
- php: '5.5'
extensions: 'optimal'
coverage: true
experimental: false
- php: '5.5'
extensions: 'minimal'
coverage: true
experimental: false
- php: '8.5'
extensions: 'optimal'
coverage: true
experimental: false
- php: '8.5'
extensions: 'minimal'
coverage: true
experimental: false
# Experimental builds. These are allowed to fail.
- php: '8.6'
extensions: 'optimal'
coverage: false
experimental: true
- php: '8.6'
extensions: 'minimal'
coverage: false
experimental: true
name: "Test: PHP ${{ matrix.php }} - ${{ matrix.extensions }}"
continue-on-error: ${{ matrix.experimental }}
permissions:
contents: read # to fetch code (actions/checkout)
steps:
- name: Check out code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
# About the "extensions":
#
# In a "normal" test run, the "default" extension set for a PHP version is used
# and it is ensured that certain extensions will be available, no matter what.
#
# For the "minimal" test run, all extensions are disabled and then only
# a limited set of minimally required extensions are re-enabled.
# The minimal set is based on the required extensions from PHPUnit + PHPMailer combined
# + Curl for Composer.
# Whether Xdebug will be enabled depends on the code coverage settings.
#
# Also see:
# https://github.com/shivammathur/setup-php/?tab=readme-ov-file#heavy_plus_sign-php-extension-support
# https://github.com/shivammathur/setup-php/wiki
- name: Determine extensions to use
id: set_extensions
run: |
if [[ "${{ matrix.extensions }}" == "optimal" ]]; then
# Optimal.
echo 'EXT=imap, mbstring, openssl, intl, ctype, filter, hash' >> $GITHUB_OUTPUT
echo 'COMPOSER_OPTIONS=' >> $GITHUB_OUTPUT
else
# Minimal.
echo 'EXT=none, curl, dom, json, libxml, mbstring, tokenizer, xml, xmlwriter, ctype, filter, hash' >> $GITHUB_OUTPUT
echo 'COMPOSER_OPTIONS=--ignore-platform-req=ext-simplexml' >> $GITHUB_OUTPUT
fi
- name: Set up PHP
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # 2.36.0
with:
php-version: ${{ matrix.php }}
coverage: ${{ matrix.coverage && 'xdebug' || 'none' }}
ini-values: sendmail_path=/usr/sbin/sendmail -t -i, error_reporting=-1, display_errors=On, display_startup_errors=On
extensions: ${{ steps.set_extensions.outputs.EXT }}
# Install dependencies and handle caching in one go.
# @link https://github.com/marketplace/actions/install-php-dependencies-with-composer
- name: Install PHP packages - normal
if: ${{ matrix.php != '8.6' }}
uses: "ramsey/composer-install@3cf229dc2919194e9e36783941438d17239e8520" # 3.1.1
with:
composer-options: ${{ steps.set_extensions.outputs.COMPOSER_OPTIONS }}
# Bust the cache at least once a month - output format: YYYY-MM.
custom-cache-suffix: $(date -u "+%Y-%m")
- name: Install PHP packages - ignore-platform-reqs
if: ${{ matrix.php == '8.6' }}
uses: "ramsey/composer-install@3cf229dc2919194e9e36783941438d17239e8520" # 3.1.1
with:
composer-options: --ignore-platform-reqs ${{ steps.set_extensions.outputs.COMPOSER_OPTIONS }}
# Bust the cache at least once a month - output format: YYYY-MM.
custom-cache-suffix: $(date -u "+%Y-%m")
# Install postfix and automatically retry if the install failed, which happens reguarly.
# @link https://github.com/marketplace/actions/retry-step
- name: Install postfix
uses: nick-invision/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3.0.2
with:
timeout_minutes: 2
max_attempts: 3
retry_wait_seconds: 8
command: |
sudo apt-get install --fix-broken -y libsqlite3-0 postfix
sudo systemctl stop postfix.service
- name: Set up sendmail
run: |
smtp-sink -d "%d.%H.%M.%S" localhost:2500 1000 &
mkdir -p build/logs
sudo cp test/testbootstrap-dist.php test/testbootstrap.php
sudo chmod +x test/fakesendmail.sh
sudo mkdir -p /var/qmail/bin
sudo cp test/fakesendmail.sh /var/qmail/bin/sendmail
sudo cp test/fakesendmail.sh /usr/sbin/sendmail
- name: Run tests, no code coverage
if: ${{ matrix.coverage == false }}
run: ./vendor/bin/phpunit --no-coverage
- name: Run tests with code coverage
if: ${{ matrix.coverage == true }}
run: vendor/bin/phpunit
- name: Send coverage report to Codecov
if: ${{ success() && matrix.coverage == true && github.event.repository.fork == false }}
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: ./build/logs/clover.xml
fail_ci_if_error: true
verbose: true

9
.gitignore vendored
View File

@ -6,4 +6,11 @@ build/
vendor/
*.pem
composer.lock
.php_cs.cache
.phpcs.xml
phpcs.xml
.phpcs-cache
/.rnd
test/PHPMailerTest.php*nonexistent_file.txt
test/*/PHPMailerTest.php*nonexistent_file.txt
phpunit.xml
/.phpunit.result.cache

31
.php_cs
View File

@ -1,31 +0,0 @@
<?php
return PhpCsFixer\Config::create()
->setRiskyAllowed(true)
->setRules([
'@Symfony' => true,
'@Symfony:risky' => true,
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => false,
'concat_space' => ['spacing' => 'one'],
'heredoc_to_nowdoc' => true,
'method_argument_space' => true,
'no_extra_consecutive_blank_lines' => ['break', 'continue', 'extra', 'return', 'throw', 'use', 'parenthesis_brace_block', 'square_brace_block', 'curly_brace_block'],
'no_php4_constructor' => true,
'no_short_echo_tag' => true,
'no_unreachable_default_argument_value' => true,
'no_useless_else' => true,
'no_useless_return' => true,
'ordered_imports' => true,
'php_unit_fqcn_annotation' => false,
'phpdoc_add_missing_param_annotation' => true,
'phpdoc_order' => true,
'phpdoc_summary' => false,
'semicolon_after_instruction' => true,
'simplified_null_return' => true
])
->setFinder(
PhpCsFixer\Finder::create()
->in(__DIR__ . '/src')
->in(__DIR__ . '/test')
)
;

View File

@ -1,128 +0,0 @@
build:
environment:
php: '5.6.0'
before_commands:
- "composer install --prefer-source"
tools:
external_code_coverage:
enabled: true
timeout: 300
filter:
excluded_paths:
- 'docs/*'
- 'examples/*'
- 'extras/*'
- 'test/*'
- 'vendor/*'
php_code_coverage:
enabled: false
filter:
excluded_paths:
- 'docs/*'
- 'examples/*'
- 'extras/*'
- 'test/*'
- 'vendor/*'
php_code_sniffer:
enabled: true
config:
standard: PSR2
filter:
excluded_paths:
- 'docs/*'
- 'examples/*'
- 'extras/*'
- 'test/*'
- 'vendor/*'
# Copy/Paste Detector
php_cpd:
enabled: true
excluded_dirs:
- docs
- examples
- extras
- test
- vendor
# PHP CS Fixer (http://http://cs.sensiolabs.org/).
php_cs_fixer:
enabled: true
config:
level: psr2
filter:
excluded_paths:
- 'docs/*'
- 'examples/*'
- 'extras/*'
- 'test/*'
- 'vendor/*'
# Analyzes the size and structure of a PHP project.
php_loc:
enabled: true
excluded_dirs:
- docs
- examples
- extras
- test
- vendor
# PHP Mess Detector (http://phpmd.org).
php_mess_detector:
enabled: true
config:
rulesets:
- codesize
- unusedcode
- naming
- design
naming_rules:
short_variable: { minimum: 2 }
filter:
excluded_paths:
- 'docs/*'
- 'examples/*'
- 'extras/*'
- 'test/*'
- 'vendor/*'
# Analyzes the size and structure of a PHP project.
php_pdepend:
enabled: true
excluded_dirs:
- docs
- examples
- extras
- test
- vendor
# Runs Scrutinizer's PHP Analyzer Tool
# https://scrutinizer-ci.com/docs/tools/php/php-analyzer/config_reference
php_analyzer:
enabled: true
config:
checkstyle:
enabled: true
naming:
enabled: true
property_name: ^[_a-zA-Z][a-zA-Z0-9_]*$ #Allow underscores & caps
method_name: ^(?:[_a-zA-Z]|__)[a-zA-Z0-9_]*$ #Allow underscores & caps
parameter_name: ^[a-z][a-zA-Z0-9_]*$ # Allow underscores
local_variable: ^[a-zA-Z][a-zA-Z0-9_]*$ #Allow underscores & caps
exception_name: ^[a-zA-Z][a-zA-Z0-9]*Exception$
isser_method_name: ^(?:[_a-zA-Z]|__)[a-zA-Z0-9]*$ #Allow underscores & caps
filter:
excluded_paths:
- 'docs/*'
- 'examples/*'
- 'extras/*'
- 'test/*'
- 'vendor/*'
# Security Advisory Checker
sensiolabs_security_checker: true

View File

@ -1,60 +0,0 @@
language: php
cache:
directories:
- $HOME/.composer/cache
before_install:
- sudo apt-get update -qq
- sudo apt-get install -y -qq postfix
install:
- REMOVE_PACKAGE="friendsofphp/php-cs-fixer"; if [ "$CS_CHECK" = 1 ]; then REMOVE_PACKAGE="phpunit/phpunit"; fi; composer remove --no-update --no-scripts --dev $REMOVE_PACKAGE
- composer remove --no-update --no-scripts --dev phpdocumentor/phpdocumentor
- composer install
- if [ "$CODE_COVERAGE" != 1 ]; then phpenv config-rm xdebug.ini || true; fi
before_script:
- sudo service postfix stop
- smtp-sink -d "%d.%H.%M.%S" localhost:2500 1000 &
- mkdir -p build/logs
- cp test/testbootstrap-dist.php test/testbootstrap.php
- chmod +x test/fakesendmail.sh
- sudo mkdir -p /var/qmail/bin
- sudo cp test/fakesendmail.sh /var/qmail/bin/sendmail
- sudo cp test/fakesendmail.sh /usr/sbin/sendmail
- |
if [[ $TRAVIS_PHP_VERSION = "hhv"* ]]; then
echo 'sendmail_path = "/usr/sbin/sendmail -t -i "' >> /etc/hhvm/php.ini
else
echo 'sendmail_path = "/usr/sbin/sendmail -t -i "' > $(php --ini|grep -m 1 "ini files in:"|cut -d ":" -f 2)/sendmail.ini
fi
script: ./vendor/bin/phpunit --configuration ./travis.phpunit.xml.dist
after_script:
- if [ "$CODE_COVERAGE" = 1 ]; then wget https://scrutinizer-ci.com/ocular.phar; fi
- if [ "$CODE_COVERAGE" = 1 ]; then php ocular.phar code-coverage:upload --format=php-clover ../build/logs/clover.xml; fi
stages:
- coding-standard
- test
jobs:
include:
- stage: coding-standard
before_install:
before_script:
script: ./vendor/bin/php-cs-fixer --diff --dry-run --verbose fix
after_script:
php: 5.5
env: CS_CHECK=1
- stage: test
php: 5.5
- php: 5.6
- php: 7.0
- php: 7.1
env: CODE_COVERAGE=1
- php: 7.2
- php: hhvm
dist: trusty

46
COMMITMENT Normal file
View File

@ -0,0 +1,46 @@
GPL Cooperation Commitment
Version 1.0
Before filing or continuing to prosecute any legal proceeding or claim
(other than a Defensive Action) arising from termination of a Covered
License, we commit to extend to the person or entity ('you') accused
of violating the Covered License the following provisions regarding
cure and reinstatement, taken from GPL version 3. As used here, the
term 'this License' refers to the specific Covered License being
enforced.
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly
and finally terminates your license, and (b) permanently, if the
copyright holder fails to notify you of the violation by some
reasonable means prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you
have received notice of violation of this License (for any work)
from that copyright holder, and you cure the violation prior to 30
days after your receipt of the notice.
We intend this Commitment to be irrevocable, and binding and
enforceable against us and assignees of or successors to our
copyrights.
Definitions
'Covered License' means the GNU General Public License, version 2
(GPLv2), the GNU Lesser General Public License, version 2.1
(LGPLv2.1), or the GNU Library General Public License, version 2
(LGPLv2), all as published by the Free Software Foundation.
'Defensive Action' means a legal proceeding or claim that We bring
against you in response to a prior proceeding or claim initiated by
you or your affiliate.
'We' means each contributor to this repository as of the date of
inclusion of this file, including subsidiaries of a corporate
contributor.
This work is available under a Creative Commons Attribution-ShareAlike
4.0 International license (https://creativecommons.org/licenses/by-sa/4.0/).

179
README.md
View File

@ -1,47 +1,54 @@
[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://supportukrainenow.org/)
![PHPMailer](https://raw.github.com/PHPMailer/PHPMailer/master/examples/images/phpmailer.png)
# PHPMailer - A full-featured email creation and transfer class for PHP
# PHPMailer A full-featured email creation and transfer class for PHP
Build status: [![Build Status](https://travis-ci.org/PHPMailer/PHPMailer.svg)](https://travis-ci.org/PHPMailer/PHPMailer)
[![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/PHPMailer/PHPMailer/badges/quality-score.png?s=3758e21d279becdf847a557a56a3ed16dfec9d5d)](https://scrutinizer-ci.com/g/PHPMailer/PHPMailer/)
[![Code Coverage](https://scrutinizer-ci.com/g/PHPMailer/PHPMailer/badges/coverage.png?s=3fe6ca5fe8cd2cdf96285756e42932f7ca256962)](https://scrutinizer-ci.com/g/PHPMailer/PHPMailer/)
[![Test status](https://github.com/PHPMailer/PHPMailer/workflows/Tests/badge.svg)](https://github.com/PHPMailer/PHPMailer/actions)
[![codecov.io](https://codecov.io/gh/PHPMailer/PHPMailer/branch/master/graph/badge.svg?token=iORZpwmYmM)](https://codecov.io/gh/PHPMailer/PHPMailer)
[![Latest Stable Version](https://poser.pugx.org/phpmailer/phpmailer/v/stable.svg)](https://packagist.org/packages/phpmailer/phpmailer)
[![Total Downloads](https://poser.pugx.org/phpmailer/phpmailer/downloads)](https://packagist.org/packages/phpmailer/phpmailer)
[![License](https://poser.pugx.org/phpmailer/phpmailer/license.svg)](https://packagist.org/packages/phpmailer/phpmailer)
[![API Docs](https://github.com/phpmailer/phpmailer/workflows/Docs/badge.svg)](https://phpmailer.github.io/PHPMailer/)
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/PHPMailer/PHPMailer/badge)](https://api.securityscorecards.dev/projects/github.com/PHPMailer/PHPMailer)
[![Latest Stable Version](https://poser.pugx.org/phpmailer/phpmailer/v/stable.svg)](https://packagist.org/packages/phpmailer/phpmailer) [![Total Downloads](https://poser.pugx.org/phpmailer/phpmailer/downloads)](https://packagist.org/packages/phpmailer/phpmailer) [![Latest Unstable Version](https://poser.pugx.org/phpmailer/phpmailer/v/unstable.svg)](https://packagist.org/packages/phpmailer/phpmailer) [![License](https://poser.pugx.org/phpmailer/phpmailer/license.svg)](https://packagist.org/packages/phpmailer/phpmailer)
## Class Features
## Features
- Probably the world's most popular code for sending email from PHP!
- Used by many open-source projects: WordPress, Drupal, 1CRM, SugarCRM, Yii, Joomla! and many more
- Integrated SMTP support - send without a local mail server
- Send emails with multiple To, CC, BCC and Reply-to addresses
- Integrated SMTP support send without a local mail server
- Send emails with multiple To, CC, BCC, and Reply-to addresses
- Multipart/alternative emails for mail clients that do not read HTML email
- Add attachments, including inline
- Support for UTF-8 content and 8bit, base64, binary, and quoted-printable encodings
- SMTP authentication with LOGIN, PLAIN, CRAM-MD5 and XOAUTH2 mechanisms over SSL and SMTP+STARTTLS transports
- Full UTF-8 support when using servers that support `SMTPUTF8`.
- Support for iCal events in multiparts and attachments
- SMTP authentication with `LOGIN`, `PLAIN`, `CRAM-MD5`, and `XOAUTH2` mechanisms over SMTPS and SMTP+STARTTLS transports
- Validates email addresses automatically
- Protect against header injection attacks
- Error messages in 47 languages!
- Protects against header injection attacks
- Error messages in over 50 languages!
- DKIM and S/MIME signing support
- Compatible with PHP 5.5 and later
- Compatible with PHP 5.5 and later, including PHP 8.5
- Namespaced to prevent name clashes
- Much more!
## Why you might need it
Many PHP developers utilize email in their code. The only PHP function that supports this is the `mail()` function. However, it does not provide any assistance for making use of popular features such as HTML-based emails and attachments.
Many PHP developers need to send email from their code. The only PHP function that supports this directly is [`mail()`](https://www.php.net/manual/en/function.mail.php). However, it does not provide any assistance for making use of popular features such as authentication, HTML messages, and attachments.
Formatting email correctly is surprisingly difficult. There are myriad overlapping RFCs, requiring tight adherence to horribly complicated formatting and encoding rules - the vast majority of code that you'll find online that uses the `mail()` function directly is just plain wrong!
*Please* don't be tempted to do it yourself - if you don't use PHPMailer, there are many other excellent libraries that you should look at before rolling your own - try SwiftMailer, Zend_Mail, eZcomponents etc.
Formatting email correctly is surprisingly difficult. There are myriad overlapping (and conflicting) standards, requiring tight adherence to horribly complicated formatting and encoding rules the vast majority of code that you'll find online that uses the `mail()` function directly is just plain wrong, if not unsafe!
The PHP `mail()` function usually sends via a local mail server, typically fronted by a `sendmail` binary on Linux, BSD and OS X platforms, however, Windows usually doesn't include a local mail server; PHPMailer's integrated SMTP implementation allows email sending on Windows platforms without a local mail server.
The PHP `mail()` function usually sends via a local mail server, typically fronted by a `sendmail` binary on Linux, BSD, and macOS platforms, however, Windows usually doesn't include a local mail server; PHPMailer's integrated SMTP client allows email sending on all platforms without needing a local mail server. Be aware though, that the `mail()` function should be avoided when possible; it's both faster and [safer](https://exploitbox.io/paper/Pwning-PHP-Mail-Function-For-Fun-And-RCE.html) to use SMTP to localhost.
*Please* don't be tempted to do it yourself if you don't use PHPMailer, there are many other excellent libraries that
you should look at before rolling your own. Try [Symfony Mailer](https://symfony.com/doc/current/mailer.html), [Laminas/Mail](https://docs.laminas.dev/laminas-mail/), [ZetaComponents](https://github.com/zetacomponents/Mail), etc.
## License
This software is distributed under the [LGPL 2.1](http://www.gnu.org/licenses/lgpl-2.1.html) license. Please read LICENSE for information on the
software availability and distribution.
This software is distributed under the [LGPL 2.1](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html) license, along with the [GPL Cooperation Commitment](https://gplcc.github.io/gplcc/). Please read [LICENSE](https://github.com/PHPMailer/PHPMailer/blob/master/LICENSE) for information on the software availability and distribution.
## Installation & loading
PHPMailer is available on [Packagist](https://packagist.org/packages/phpmailer/phpmailer) (using semantic versioning), and installation via composer is the recommended way to install PHPMailer. Just add this line to your `composer.json` file:
PHPMailer is available on [Packagist](https://packagist.org/packages/phpmailer/phpmailer) (using semantic versioning), and installation via [Composer](https://getcomposer.org) is the recommended way to install PHPMailer. Just add this line to your `composer.json` file:
```json
"phpmailer/phpmailer": "~6.0"
"phpmailer/phpmailer": "^7.0.0"
```
or run
@ -50,11 +57,13 @@ or run
composer require phpmailer/phpmailer
```
Note that the `vendor` folder and the `vendor/autoload.php` script are generated by composer; they are not part of PHPMailer.
Note that the `vendor` folder and the `vendor/autoload.php` script are generated by Composer; they are not part of PHPMailer.
If you want to use the Gmail XOAUTH2 authentication class, you will also need to add a dependency on the `league/oauth2-client` package in your `composer.json`.
If you want to use XOAUTH2 authentication, you will also need to add a dependency on the `league/oauth2-client` and appropriate service adapters package in your `composer.json`, or take a look at
by @decomplexity's [SendOauth2 wrapper](https://github.com/decomplexity/SendOauth2), especially if you're using Microsoft services.
Alternatively, if you're not using composer, copy the contents of the PHPMailer folder into one of the `include_path` directories specified in your PHP configuration and load each class file manually:
Alternatively, if you're not using Composer, you
can [download PHPMailer as a zip file](https://github.com/PHPMailer/PHPMailer/archive/master.zip), (note that docs and examples are not included in the zip file), then copy the contents of the PHPMailer folder into one of the `include_path` directories specified in your PHP configuration and load each class file manually:
```php
<?php
@ -66,57 +75,58 @@ require 'path/to/PHPMailer/src/PHPMailer.php';
require 'path/to/PHPMailer/src/SMTP.php';
```
If you're not using the `SMTP` class explicitly (you're probably not), you don't need a `use` line for the SMTP class.
If you don't speak git or just want a tarball, click the 'zip' button on the right of the project page in GitHub, though note that docs and examples are not included in the tarball.
## Upgrading from 5.2
The biggest changes are that source files are now in the `src/` folder, and PHPMailer now declares the namespace `PHPMailer\PHPMailer`. This has several important effects [read the upgrade guide](https://github.com/PHPMailer/PHPMailer/tree/master/UPGRADING.md) for more details.
If you're not using the `SMTP` class explicitly (you're probably not), you don't need a `use` line for it. Even if you're not using exceptions, you do still need to load the `Exception` class as it is used internally.
## Legacy versions
PHPMailer 5.2 (which is compatible with PHP 5.0 - 7.0) is no longer being supported for feature updates, and will only be receiving security updates from now on. You will find the latest version of 5.2 in the [5.2-stable branch](https://github.com/PHPMailer/PHPMailer/tree/5.2-stable), and future versions of 5.2 will be tagged with 5.2.x version numbers, so existing composer configs should remain working. If you're using PHP 5.5 or later, we recommend you make the necessary changes to switch to the 6.0 release.
PHPMailer 5.2 (which is compatible with PHP 5.0 — 7.0) is no longer supported, even for security updates. You will find the latest version of 5.2 in the [5.2-stable branch](https://github.com/PHPMailer/PHPMailer/tree/5.2-stable). If you're using PHP 5.5 or later (which you should be), switch to the 6.x releases.
### Upgrading from 5.2
The biggest changes are that source files are now in the `src/` folder, and PHPMailer now declares the namespace `PHPMailer\PHPMailer`. This has several important effects [read the upgrade guide](https://github.com/PHPMailer/PHPMailer/tree/master/UPGRADING.md) for more details.
### Minimal installation
While installing the entire package manually or with composer is simple, convenient and reliable, you may want to include only vital files in your project. At the very least you will need [src/PHPMailer.php](https://github.com/PHPMailer/PHPMailer/tree/master/src/PHPMailer.php). If you're using SMTP, you'll need [src/SMTP.php](https://github.com/PHPMailer/PHPMailer/tree/master/src/SMTP.php), and if you're using POP-before SMTP, you'll need [src/POP3.php](https://github.com/PHPMailer/PHPMailer/tree/master/src/POP3.php). You can skip the [language](https://github.com/PHPMailer/PHPMailer/tree/master/language/) folder if you're not showing errors to users and can make do with English-only errors. If you're using XOAUTH2 you will need [src/OAuth.php](https://github.com/PHPMailer/PHPMailer/tree/master/src/OAuth.php) as well as the composer dependencies for the services you wish to authenticate with. Really, it's much easier to use composer!
While installing the entire package manually or with Composer is simple, convenient, and reliable, you may want to include only vital files in your project. At the very least you will need [src/PHPMailer.php](https://github.com/PHPMailer/PHPMailer/tree/master/src/PHPMailer.php). If you're using SMTP, you'll need [src/SMTP.php](https://github.com/PHPMailer/PHPMailer/tree/master/src/SMTP.php), and if you're using POP-before SMTP (*very* unlikely!), you'll need [src/POP3.php](https://github.com/PHPMailer/PHPMailer/tree/master/src/POP3.php). You can skip the [language](https://github.com/PHPMailer/PHPMailer/tree/master/language/) folder if you're not showing errors to users and can make do with English-only errors. If you're using XOAUTH2 you will need [src/OAuth.php](https://github.com/PHPMailer/PHPMailer/tree/master/src/OAuth.php) as well as the Composer dependencies for the services you wish to authenticate with. Really, it's much easier to use Composer!
## A Simple Example
```php
<?php
// Import PHPMailer classes into the global namespace
// These must be at the top of your script, not inside a function
//Import PHPMailer classes into the global namespace
//These must be at the top of your script, not inside a function
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;
use PHPMailer\PHPMailer\Exception;
//Load composer's autoloader
//Load Composer's autoloader (created by composer, not included with PHPMailer)
require 'vendor/autoload.php';
$mail = new PHPMailer(true); // Passing `true` enables exceptions
//Create an instance; passing `true` enables exceptions
$mail = new PHPMailer(true);
try {
//Server settings
$mail->SMTPDebug = 2; // Enable verbose debug output
$mail->isSMTP(); // Set mailer to use SMTP
$mail->Host = 'smtp1.example.com;smtp2.example.com'; // Specify main and backup SMTP servers
$mail->SMTPAuth = true; // Enable SMTP authentication
$mail->Username = 'user@example.com'; // SMTP username
$mail->Password = 'secret'; // SMTP password
$mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted
$mail->Port = 587; // TCP port to connect to
$mail->SMTPDebug = SMTP::DEBUG_SERVER; //Enable verbose debug output
$mail->isSMTP(); //Send using SMTP
$mail->Host = 'smtp.example.com'; //Set the SMTP server to send through
$mail->SMTPAuth = true; //Enable SMTP authentication
$mail->Username = 'user@example.com'; //SMTP username
$mail->Password = 'secret'; //SMTP password
$mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS; //Enable implicit TLS encryption
$mail->Port = 465; //TCP port to connect to; use 587 if you have set `SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS`
//Recipients
$mail->setFrom('from@example.com', 'Mailer');
$mail->addAddress('joe@example.net', 'Joe User'); // Add a recipient
$mail->addAddress('ellen@example.com'); // Name is optional
$mail->addAddress('joe@example.net', 'Joe User'); //Add a recipient
$mail->addAddress('ellen@example.com'); //Name is optional
$mail->addReplyTo('info@example.com', 'Information');
$mail->addCC('cc@example.com');
$mail->addBCC('bcc@example.com');
//Attachments
$mail->addAttachment('/var/tmp/file.tar.gz'); // Add attachments
$mail->addAttachment('/tmp/image.jpg', 'new.jpg'); // Optional name
$mail->addAttachment('/var/tmp/file.tar.gz'); //Add attachments
$mail->addAttachment('/tmp/image.jpg', 'new.jpg'); //Optional name
//Content
$mail->isHTML(true); // Set email format to HTML
$mail->isHTML(true); //Set email format to HTML
$mail->Subject = 'Here is the subject';
$mail->Body = 'This is the HTML message body <b>in bold!</b>';
$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
@ -124,63 +134,57 @@ try {
$mail->send();
echo 'Message has been sent';
} catch (Exception $e) {
echo 'Message could not be sent.';
echo 'Mailer Error: ' . $mail->ErrorInfo;
echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}";
}
```
You'll find plenty more to play with in the [examples](https://github.com/PHPMailer/PHPMailer/tree/master/examples) folder.
You'll find plenty to play with in the [examples](https://github.com/PHPMailer/PHPMailer/tree/master/examples) folder, which covers many common scenarios including sending through Gmail, building contact forms, sending to mailing lists, and more.
If you are re-using the instance (e.g. when sending to a mailing list), you may need to clear the recipient list to avoid sending duplicate messages. See [the mailing list example](https://github.com/PHPMailer/PHPMailer/blob/master/examples/mailing_list.phps) for further guidance.
That's it. You should now be ready to use PHPMailer!
## Localization
PHPMailer defaults to English, but in the [language](https://github.com/PHPMailer/PHPMailer/tree/master/language/) folder you'll find numerous (46 at the time of writing!) translations for PHPMailer error messages that you may encounter. Their filenames contain [ISO 639-1](http://en.wikipedia.org/wiki/ISO_639-1) language code for the translations, for example `fr` for French. To specify a language, you need to tell PHPMailer which one to use, like this:
PHPMailer defaults to English, but in the [language](https://github.com/PHPMailer/PHPMailer/tree/master/language/) folder, you'll find many translations for PHPMailer error messages that you may encounter. Their filenames contain [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) language code for the translations, for example `fr` for French. To specify a language, you need to tell PHPMailer which one to use, like this:
```php
// To load the French version
//To load the French version
$mail->setLanguage('fr', '/optional/path/to/language/directory/');
```
We welcome corrections and new languages - if you're looking for corrections to do, run the [PHPMailerLangTest.php](https://github.com/PHPMailer/PHPMailer/tree/master/test/PHPMailerLangTest.php) script in the tests folder and it will show any missing translations.
We welcome corrections and new languages if you're looking for corrections, run the [Language/TranslationCompletenessTest.php](https://github.com/PHPMailer/PHPMailer/blob/master/test/Language/TranslationCompletenessTest.php) script in the tests folder and it will show any missing translations.
## Documentation
Start reading at the [GitHub wiki](https://github.com/PHPMailer/PHPMailer/wiki). If you're having trouble, this should be the first place you look as it's the most frequently updated.
Start reading at the [GitHub wiki](https://github.com/PHPMailer/PHPMailer/wiki). If you're having trouble, head for [the troubleshooting guide](https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting) as it's frequently updated.
Examples of how to use PHPMailer for common scenarios can be found in the [examples](https://github.com/PHPMailer/PHPMailer/tree/master/examples) folder. If you're looking for a good starting point, we recommend you start with [the Gmail example](https://github.com/PHPMailer/PHPMailer/tree/master/examples/gmail.phps).
Note that in order to reduce PHPMailer's deployed code footprint, the examples are no longer included if you load PHPMailer via composer or via [GitHub's zip file download](https://github.com/PHPMailer/PHPMailer/archive/master.zip), so you'll need to either clone the git repository or use the above links to get to the examples directly.
To reduce PHPMailer's deployed code footprint, examples are not included if you load PHPMailer via Composer or via [GitHub's zip file download](https://github.com/PHPMailer/PHPMailer/archive/master.zip), so you'll need to either clone the git repository or use the above links to get to the examples directly.
Complete generated API documentation is [available online](http://phpmailer.github.io/PHPMailer/).
Complete generated API documentation is [available online](https://phpmailer.github.io/PHPMailer/).
You can generate complete API-level documentation by running `phpdoc` in the top-level folder, and documentation will appear in teh `docs` folder, though you'll need to have [PHPDocumentor](http://www.phpdoc.org) installed. You may find [the unit tests](https://github.com/PHPMailer/PHPMailer/tree/master/test/phpmailerTest.php) a good source of how to do various operations such as encryption.
You can generate complete API-level documentation by running `phpdoc` in the top-level folder, and documentation will appear in the `docs` folder, though you'll need to have [PHPDocumentor](https://www.phpdoc.org) installed. You may find [the unit tests](https://github.com/PHPMailer/PHPMailer/blob/master/test/PHPMailer/PHPMailerTest.php) a good reference for how to do various operations such as encryption.
If the documentation doesn't cover what you need, search the [many questions on Stack Overflow](http://stackoverflow.com/questions/tagged/phpmailer), and before you ask a question about "SMTP Error: Could not connect to SMTP host.", [read the troubleshooting guide](https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting).
If the documentation doesn't cover what you need, search the [many questions on Stack Overflow](https://stackoverflow.com/questions/tagged/phpmailer), and before you ask a question about "SMTP Error: Could not connect to SMTP host.", [read the troubleshooting guide](https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting).
## Tests
There is a PHPUnit test script in the [test](https://github.com/PHPMailer/PHPMailer/tree/master/test/) folder. PHPMailer uses PHPUnit 4.8 - we would use 5.x but we need to run on PHP 5.5.
[PHPMailer tests](https://github.com/PHPMailer/PHPMailer/tree/master/test/) use PHPUnit 9, with [a polyfill](https://github.com/Yoast/PHPUnit-Polyfills) to let 9-style tests run on older PHPUnit and PHP versions.
Build status: [![Build Status](https://travis-ci.org/PHPMailer/PHPMailer.svg)](https://travis-ci.org/PHPMailer/PHPMailer)
[![Test status](https://github.com/PHPMailer/PHPMailer/workflows/Tests/badge.svg)](https://github.com/PHPMailer/PHPMailer/actions)
If this isn't passing, is there something you can do to help?
## Security
Please disclose any vulnerabilities found responsibly report security issues to the maintainers privately.
Please disclose any vulnerabilities found responsibly - report any security problems found to the maintainers privately.
PHPMailer versions prior to 5.2.22 (released January 9th 2017) have a local file disclosure vulnerability, [CVE-2017-5223](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2017-5223). If content passed into `msgHTML()` is sourced from unfiltered user input, relative paths can map to absolute local file paths and added as attachments. Also note that `addAttachment` (just like `file_get_contents`, `passthru`, `unlink`, etc) should not be passed user-sourced params either! Reported by Yongxiang Li of Asiasecurity.
PHPMailer versions prior to 5.2.20 (released December 28th 2016) are vulnerable to [CVE-2016-10045](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-10045) a remote code execution vulnerability, responsibly reported by [Dawid Golunski](https://legalhackers.com/advisories/PHPMailer-Exploit-Remote-Code-Exec-CVE-2016-10045-Vuln-Patch-Bypass.html), and patched by Paul Buonopane (@Zenexer).
PHPMailer versions prior to 5.2.18 (released December 2016) are vulnerable to [CVE-2016-10033](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-10033) a critical remote code execution vulnerability, responsibly reported by [Dawid Golunski](http://legalhackers.com/advisories/PHPMailer-Exploit-Remote-Code-Exec-CVE-2016-10033-Vuln.html).
See [SECURITY](https://github.com/PHPMailer/PHPMailer/tree/master/SECURITY.md) for more detail on security issues.
See [SECURITY](https://github.com/PHPMailer/PHPMailer/tree/master/SECURITY.md) and [PHPMailer's security advisories on GitHub](https://github.com/PHPMailer/PHPMailer/security).
## Contributing
Please submit bug reports, suggestions and pull requests to the [GitHub issue tracker](https://github.com/PHPMailer/PHPMailer/issues).
Please submit bug reports, suggestions, and pull requests to the [GitHub issue tracker](https://github.com/PHPMailer/PHPMailer/issues).
We're particularly interested in fixing edge-cases, expanding test coverage and updating translations.
We're particularly interested in fixing edge cases, expanding test coverage, and updating translations.
If you found a mistake in the docs, or want to add something, go ahead and amend the wiki - anyone can edit it.
If you found a mistake in the docs, or want to add something, go ahead and amend the wiki anyone can edit it.
If you have git clones from prior to the move to the PHPMailer GitHub organisation, you'll need to update any remote URLs referencing the old GitHub location with a command like this from within your clone:
@ -191,29 +195,38 @@ git remote set-url upstream https://github.com/PHPMailer/PHPMailer.git
Please *don't* use the SourceForge or Google Code projects any more; they are obsolete and no longer maintained.
## Sponsorship
Development time and resources for PHPMailer are provided by [Smartmessages.net](https://info.smartmessages.net/), a powerful email marketing system.
Development time and resources for PHPMailer are provided by [Smartmessages.net](https://info.smartmessages.net/), the world's only privacy-first email marketing system.
<a href="https://info.smartmessages.net/"><img src="https://www.smartmessages.net/img/smartmessages-logo.svg" width="250" height="28" alt="Smartmessages email marketing"></a>
<a href="https://info.smartmessages.net/"><img src="https://www.smartmessages.net/img/smartmessages-logo.svg" width="550" alt="Smartmessages.net privacy-first email marketing logo"></a>
Other contributions are gladly received, whether in beer 🍺, T-shirts 👕, Amazon wishlist raids, or cold, hard cash 💰. If you'd like to donate to say "thank you" to maintainers or contributors, please contact them through individual profile pages via [the contributors page](https://github.com/PHPMailer/PHPMailer/graphs/contributors).
Donations are very welcome, whether in beer 🍺, T-shirts 👕, or cold, hard cash 💰. Sponsorship through GitHub is a simple and convenient way to say "thank you" to PHPMailer's maintainers and contributors just click the "Sponsor" button [on the project page](https://github.com/PHPMailer/PHPMailer). If your company uses PHPMailer, consider taking part in Tidelift's enterprise support programme.
## PHPMailer For Enterprise
Available as part of the Tidelift Subscription.
The maintainers of PHPMailer and thousands of other packages are working with Tidelift to deliver commercial
support and maintenance for the open-source packages you use to build your applications. Save time, reduce risk, and
improve code health, while paying the maintainers of the exact packages you
use. [Learn more.](https://tidelift.com/subscription/pkg/packagist-phpmailer-phpmailer?utm_source=packagist-phpmailer-phpmailer&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
## Changelog
See [changelog](changelog.md).
## History
- PHPMailer was originally written in 2001 by Brent R. Matzelle as a [SourceForge project](http://sourceforge.net/projects/phpmailer/).
- Marcus Bointon (coolbru on SF) and Andy Prevost (codeworxtech) took over the project in 2004.
- PHPMailer was originally written in 2001 by Brent R. Matzelle as a [SourceForge project](https://sourceforge.net/projects/phpmailer/).
- [Marcus Bointon](https://github.com/Synchro) (`coolbru` on SF) and Andy Prevost (`codeworxtech`) took over the project in 2004.
- Became an Apache incubator project on Google Code in 2010, managed by Jim Jagielski.
- Marcus created his fork on [GitHub](https://github.com/Synchro/PHPMailer) in 2008.
- Marcus created [his fork on GitHub](https://github.com/Synchro/PHPMailer) in 2008.
- Jim and Marcus decide to join forces and use GitHub as the canonical and official repo for PHPMailer in 2013.
- PHPMailer moves to the [PHPMailer organisation](https://github.com/PHPMailer) on GitHub in 2013.
- PHPMailer moves to [the PHPMailer organisation](https://github.com/PHPMailer) on GitHub in 2013.
### What's changed since moving from SourceForge?
- Official successor to the SourceForge and Google Code projects.
- Test suite.
- Continuous integration with Travis-CI.
- Continuous integration with GitHub Actions.
- Composer support.
- Public development.
- Additional languages and language strings.
- CRAM-MD5 authentication support.
- Preserves full repo history of authors, commits and branches from the original SourceForge project.
- Preserves full repo history of authors, commits, and branches from the original SourceForge project.

View File

@ -1,14 +1,25 @@
# Security notices relating to PHPMailer
Please disclose any vulnerabilities found responsibly - report any security problems found to the maintainers privately.
Please disclose any security issues or vulnerabilities found through [Tidelift's coordinated disclosure system](https://tidelift.com/security) or to the maintainers privately.
PHPMailer versions prior to 5.2.24 (released July 26th 2017) have an XSS vulnerability in one of the code examples, [CVE-2017-11503](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2017-11503). The `code_generator.phps` example did not filter user input prior to output. This file is distributed with a `.phps` extension, so it it not normally executable unless it is explicitly renamed, so it is safe by default. There was also an undisclosed potential XSS vulnerability in the default exception handler (unused by default). Patches for both issues kindly provided by Patrick Monnerat of the Fedora Project.
PHPMailer 6.4.1 and earlier contain a vulnerability that can result in untrusted code being called (if such code is injected into the host project's scope by other means). If the `$patternselect` parameter to `validateAddress()` is set to `'php'` (the default, defined by `PHPMailer::$validator`), and the global namespace contains a function called `php`, it will be called in preference to the built-in validator of the same name. Mitigated in PHPMailer 6.5.0 by denying the use of simple strings as validator function names. Recorded as [CVE-2021-3603](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2021-3603). Reported by [Vikrant Singh Chauhan](mailto:vi@hackberry.xyz) via [huntr.dev](https://www.huntr.dev/).
PHPMailer versions 6.4.1 and earlier contain a possible remote code execution vulnerability through the `$lang_path` parameter of the `setLanguage()` method. If the `$lang_path` parameter is passed unfiltered from user input, it can be set to [a UNC path](https://docs.microsoft.com/en-us/dotnet/standard/io/file-path-formats#unc-paths), and if an attacker is also able to persuade the server to load a file from that UNC path, a script file under their control may be executed. This vulnerability only applies to systems that resolve UNC paths, typically only Microsoft Windows.
PHPMailer 6.5.0 mitigates this by no longer treating translation files as PHP code, but by parsing their text content directly. This approach avoids the possibility of executing unknown code while retaining backward compatibility. This isn't ideal, so the current translation format is deprecated and will be replaced in the next major release. Recorded as [CVE-2021-34551](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2021-34551). Reported by [Jilin Diting Information Technology Co., Ltd](https://listensec.com) via Tidelift.
PHPMailer versions between 6.1.8 and 6.4.0 contain a regression of the earlier CVE-2018-19296 object injection vulnerability as a result of [a fix for Windows UNC paths in 6.1.8](https://github.com/PHPMailer/PHPMailer/commit/e2e07a355ee8ff36aba21d0242c5950c56e4c6f9). Recorded as [CVE-2020-36326](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2020-36326). Reported by Fariskhi Vidyan via Tidelift. 6.4.1 fixes this issue, and also enforces stricter checks for URL schemes in local path contexts.
PHPMailer versions 6.1.5 and earlier contain an output escaping bug that occurs in `Content-Type` and `Content-Disposition` when filenames passed into `addAttachment` and other methods that accept attachment names contain double quote characters, in contravention of RFC822 3.4.1. No specific vulnerability has been found relating to this, but it could allow file attachments to bypass attachment filters that are based on matching filename extensions. Recorded as [CVE-2020-13625](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2020-13625). Reported by Elar Lang of Clarified Security.
PHPMailer versions prior to 6.0.6 and 5.2.27 are vulnerable to an object injection attack by passing `phar://` paths into `addAttachment()` and other functions that may receive unfiltered local paths, possibly leading to RCE. Recorded as [CVE-2018-19296](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2018-19296). See [this article](https://knasmueller.net/5-answers-about-php-phar-exploitation) for more info on this type of vulnerability. Mitigated by blocking the use of paths containing URL-protocol style prefixes such as `phar://`. Reported by Sehun Oh of cyberone.kr.
PHPMailer versions prior to 5.2.24 (released July 26th 2017) have an XSS vulnerability in one of the code examples, [CVE-2017-11503](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2017-11503). The `code_generator.phps` example did not filter user input prior to output. This file is distributed with a `.phps` extension, so it is not normally executable unless it is explicitly renamed, and the file is not included when PHPMailer is loaded through composer, so it is safe by default. There was also an undisclosed potential XSS vulnerability in the default exception handler (unused by default). Patches for both issues kindly provided by Patrick Monnerat of the Fedora Project.
PHPMailer versions prior to 5.2.22 (released January 9th 2017) have a local file disclosure vulnerability, [CVE-2017-5223](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2017-5223). If content passed into `msgHTML()` is sourced from unfiltered user input, relative paths can map to absolute local file paths and added as attachments. Also note that `addAttachment` (just like `file_get_contents`, `passthru`, `unlink`, etc) should not be passed user-sourced params either! Reported by Yongxiang Li of Asiasecurity.
PHPMailer versions prior to 5.2.20 (released December 28th 2016) are vulnerable to [CVE-2016-10045](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-10045) a remote code execution vulnerability, responsibly reported by [Dawid Golunski](https://legalhackers.com/advisories/PHPMailer-Exploit-Remote-Code-Exec-CVE-2016-10045-Vuln-Patch-Bypass.html), and patched by Paul Buonopane (@Zenexer).
PHPMailer versions prior to 5.2.18 (released December 2016) are vulnerable to [CVE-2016-10033](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-10033) a remote code execution vulnerability, responsibly reported by [Dawid Golunski](http://legalhackers.com/advisories/PHPMailer-Exploit-Remote-Code-Exec-CVE-2016-10033-Vuln.html).
PHPMailer versions prior to 5.2.18 (released December 2016) are vulnerable to [CVE-2016-10033](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-10033) a remote code execution vulnerability, responsibly reported by [Dawid Golunski](https://legalhackers.com/advisories/PHPMailer-Exploit-Remote-Code-Exec-CVE-2016-10033-Vuln.html).
PHPMailer versions prior to 5.2.14 (released November 2015) are vulnerable to [CVE-2015-8476](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2015-8476) an SMTP CRLF injection bug permitting arbitrary message sending.

48
SMTPUTF8.md Normal file
View File

@ -0,0 +1,48 @@
# A short history of UTF-8 in email
## Background
For most of its existence, SMTP has been a 7-bit channel, only supporting US-ASCII characters. This has been a problem for many languages, especially those that use non-Latin scripts, and has led to the development of various workarounds.
The first major improvement, introduced in 1994 in [RFC 1652](https://www.rfc-editor.org/rfc/rfc1652) and extended in 2011 in [RFC 6152](https://www.rfc-editor.org/rfc/rfc6152), was the addition of the `8BITMIME` SMTP extension, which allowed raw 8-bit data to be included in message bodies sent over SMTP.
This allowed the message *contents* to contain 8-bit data, including things like UTF-8 text, even though the SMTP protocol itself was still firmly 7-bit. This worked by having the server switch to 8-bit after the headers, and then back to 7-bit after the completion of a `DATA` command.
From 1996, messages could support [RFC 2047 encoding](https://www.rfc-editor.org/rfc/rfc2047), which permitted inserting characters from any character set into header *values* (but not names), but only by encoding them in somewhat unreadable ways to allow them to survive passage through a 7-bit channel. An example with a subject of "Schrödinger's cat" would be:
```
Subject: =?utf-8?Q=Schr=C3=B6dinger=92s_Cat?=
```
Here the accented `ö` is encoded as `=C3=B6`, which is the UTF-8 encoding of the 2-byte character, and the whole thing is wrapped in `=?utf-8?Q?` to indicate that it uses the UTF-8 charset and `quoted-printable` encoding. This is a bit of a hack, and not very human-friendly, but it works.
Similarly, 8-bit message bodies could be encoded using the same `quoted-printable` and `base64` content transfer encoding (CTE) schemes, which preserved the 8-bit content while encoding it in a format that could survive transmission through a 7-bit channel.
Domain names were originally also stuck in a 7-bit world, actually even more constrained to only a subset of the US-ASCII character set. But of course, many people want to have domains in their own language/script. Internationalized domain name (IDN) permitted this, using yet another complex encoding scheme called punycode, defined for domain names in 2003 in [RFC 3492](https://www.rfc-editor.org/rfc/rfc3492). This finally allowed the domain part (after the `@`) of email addresses to contain UTF-8, though it was actually an illusion preserved by email client applications. For example, an address of
`user@café.example.com` translates to
`user@xn--caf-dma.example.com` in punycode, rendering it mostly unreadable, but 7-bit friendly, and remaining compatible with email clients that don't know about IDN.
The one remaining part of email that could not handle UTF-8 is the local part of email addresses (the part before the `@`).
I've only mentioned UTF-8 here, but most of these approaches also allowed other character sets that were popular, such as [the ISO-8859 family](https://en.wikipedia.org/wiki/ISO/IEC_8859). However, UTF-8 solves so many problems that these other character sets are gradually falling out of favour, as UTF-8 can support all languages.
This patchwork of overlapping approaches has served us well, but we have to admit that it's a mess.
## SMTPUTF8
`SMTPUTF8` is another SMTP extension, defined in [RFC 6531](https://www.rfc-editor.org/rfc/rfc6531) in 2012. This essentially solves the whole problem, allowing the entire SMTP conversation — commands, headers, and message bodies — to be sent in raw, unencoded UTF-8.
But there's a problem with this approach: adoption. If you send a UTF-8 message to a recipient whose mail server doesn't support this format, the sender has to somehow downgrade the message to make it survive a transition to 7-bit. This is a hard problem to solve, especially since there is no way to make a 7-bit system support UTF-8 in the local parts of addresses. This downgrade problem is what held up the adoption of `SMTPUTF8` in PHPMailer for many years, but in that time the *de facto* approach has become to simply fail in that situation, and tell the recipient it's time they upgraded their mail server 😅.
The vast majority of large email providers (gmail, Yahoo, Microsoft, etc), mail servers (postfix, exim, IIS, etc), and mail clients (Apple Mail, Outlook, Thunderbird, etc) now all support SMTPUTF8, so the need for backward compatibility is no longer what it was.
## SMTPUTF8 in PHPMailer
Several other PHP email libraries have implemented a halfway solution to `SMTPUTF8`, adding only the ability to support UTF-8 in email addresses, not elsewhere in the protocol. I wanted PHPMailer to do it "the right way", and this has taken much longer. PHPMailer now supports UTF-8 everywhere, and does not need to use transfer or header encodings for UTF-8 text when connecting to an `SMTPUTF8`-capable mail server.
This support is handled automatically: if you add an email address that requires UTF-8, PHPMailer will use UTF-8 for everything. If not, it will fall back to 7-bit and encode the message as necessary.
The one place you will need to be careful is in the selection of the address validator. By default, PHPMailer uses PHP's built-in `filter_var` validator, which does not allow UTF-8 email addresses. When PHPMailer spots that you have submitted a UTF-8 address, but have not altered the default validator, it will automatically switch to using a UTF-8-compatible validator. As soon as you do this, any SMTP connection you make will *require* that the server you connect to supports `SMTPUTF8`. You can select this validator explicitly by setting `PHPMailer::$validator = 'eai'` (an acronym for Email Address Internationalization).
### Postfix gotcha
Postfix has supported `SMTPUTF8` for a long time, but it has a peculiarity that it does not always advertise that it does so. However, rather surprisingly, if you use UTF-8 in the conversation, it will work anyway.

View File

@ -6,7 +6,7 @@ If you're in doubt about how you should be using PHPMailer 6, take a look at the
## PHP Version
PHPMailer 6.0 requires PHP 5.5 or later, and is fully compatible with PHP 7.0. PHPMailer 5.2 supported PHP 5.0 and upwards, so if you need to run on a legacy PHP version, see the [PHPMailer 5.2-stable branch on Github](https://github.com/PHPMailer/PHPMailer/tree/5.2-stable).
PHPMailer 6.0 requires PHP 5.5 or later, and is fully compatible with PHP versions all the way up to 8.4. PHPMailer 5.2 supported PHP 5.0 and upwards, so if you need to run on a legacy PHP version, see the [PHPMailer 5.2-stable branch on Github](https://github.com/PHPMailer/PHPMailer/tree/5.2-stable), but bear in mind that this branch is no longer maintained.
## Loading PHPMailer
@ -38,7 +38,7 @@ require 'src/Exception.php';
```
## Namespace
PHPMailer 6 uses a [namespace](http://php.net/manual/en/language.namespaces.rationale.php) of `PHPMailer\PHPMailer`, because it's the PHPMailer project within the PHPMailer organisation. You **must** import (with a `use` statement) classes you're using explicitly into your own namespace, or reference them absolutely in the global namespace - all the examples do this. This means the fully-qualified name of the main PHPMailer class is `PHPMailer\PHPMailer\PHPMailer`, which is a bit of a mouthful, but there's no harm in it! If you are using other PHPMailer classes explicitly (such as `SMTP` or `Exception`), you will need to import them into your namespace too.
PHPMailer 6 uses a [namespace](https://www.php.net/manual/en/language.namespaces.rationale.php) of `PHPMailer\PHPMailer`, because it's the PHPMailer project within the PHPMailer organisation. You **must** import (with a `use` statement) classes you're using explicitly into your own namespace, or reference them absolutely in the global namespace - all the examples do this. This means the fully-qualified name of the main PHPMailer class is `PHPMailer\PHPMailer\PHPMailer`, which is a bit of a mouthful, but there's no harm in it! If you are using other PHPMailer classes explicitly (such as `SMTP` or `Exception`), you will need to import them into your namespace too.
For example you might create an instance like this:
@ -91,7 +91,7 @@ try {
```
## OAuth2 Support
The OAuth2 implementation has been completely redesigned using the [OAuth2 packages](http://oauth2-client.thephpleague.com) from the [League of of extraordinary packages](http://thephpleague.com), providing support for many more OAuth services, and you'll need to update your code if you were using OAuth in 5.2. See [the examples](https://github.com/PHPMailer/PHPMailer/tree/master/examples) and documentation in the [PHPMailer wiki](https://github.com/PHPMailer/PHPMailer/wiki).
The OAuth2 implementation has been completely redesigned using the [OAuth2 packages](https://oauth2-client.thephpleague.com) from the [League of extraordinary packages](https://thephpleague.com), providing support for many more OAuth services, and you'll need to update your code if you were using OAuth in 5.2. See [the examples](https://github.com/PHPMailer/PHPMailer/tree/master/examples) and documentation in the [PHPMailer wiki](https://github.com/PHPMailer/PHPMailer/wiki).
## Extras
Additional classes previously bundled in the `Extras` folder (such as htmlfilter and EasyPeasyICS) have been removed - use equivalent packages from [packagist.org](https://packagist.org) instead.

View File

@ -1 +1 @@
6.0.3
7.0.2

View File

@ -1,5 +1,340 @@
# PHPMailer Change Log
## Version 7.0.2 (January 9th, 2026)
* Fixes for sendmail parameter problems in WordPress, thanks to @SirLouen
* Reduce memory consumption when sending large attachments by @RobinvanderVliet
## Version 7.0.1 (November 25th, 2025)
* Use From domain when generating CIDs in msgHTML.
* Update to PHPCompatibility 10, resolve numerous PHPCS issues in PHP 8.5.
* Revise GitHub actions for PHP 8.5 and experimental 8.6 tests.
* Switch gmail example from the deprecated IMAP extension to use `directorytree/imapengine` for IMAP uploads.
* Set `htmlspecialchars()` flags explicitly and consistently.
* Convert XOAUTH2 token exceptions into PHPMailer Exceptions. The original exception is available as an inner exception.
* Deprecate VERSION constants in POP3 and SMTP classes.
* Remove dependency on `roave/security-advisories`; it's now built into composer 2.9.
* Update Dutch, Esperanto, and Norwegian translations.
## Version 7.0.0 (October 15th, 2025)
This is exactly the same as 6.11.1 but bumps the major version number to indicate the presence of a BC break in child classes. Specifically, `lang()`, `setLanguage()`, and `$language` are now static, and should be called statically.
## Version 6.12.0 (October 15th, 2025)
This is exactly the same as 6.10.0, reverting all the changes in 6.11.0 and 6.11.1, which inadvertently introduced a BC break affecting child classes. 6.11.1 has been re-released as 7.0.0.
## Version 6.11.1 (September 30th, 2025)
* Avoid function signature problems with the deprecation of `$useimap` in `parseAddresses`.
## Version 6.11.0 (September 29th, 2025)
* Add support for [RFC4954](https://www.rfc-editor.org/rfc/rfc4954#section-4) two-part authentication for large XOAUTH2 tokens.
* Also support empty tokens.
* Avoid bogus static analyser deprecation warnings in `setFrom`.
* Make language loading entirely static, thanks to @SirLouen.
* Emit warnings when `parseAddresses()` is used without the IMAP extension.
* Handle `mb_decode_mimeheader` changes from PHP 8.3+.
* Deprecate the charset param to parseAddresses.
* Fix PHP 8.5 linting issue.
* Don't use `-t` switch when calling qmail.
* Checking for interrupted system calls now works in languages other than English.
* Add support for extracting gmail transaction IDs after sending.
* For consistency, the protected `ReplyTo` property has been changed to match the format used for other address arrays.
* Fix line length issues when using S/MIME signing.
* Pin action runners to exact versions to avoid unexpected upstream changes.
## Version 6.10.0 (April 24th, 2025)
* Add support for [RFC 6530 SMTPUTF8](https://www.rfc-editor.org/rfc/rfc6530), permitting use of UTF-8 Unicode characters everywhere, thanks to @arnt and ICANN. See `SMTPUTF8.md` for details.
* More reliable checking for multibyte support.
## Version 6.9.3 (November 22nd, 2024)
* Add support for the release version of PHP 8.4
* Add experimental support for PHP 8.5
* Use rfc-editor.org for all RFC docs links
## Version 6.9.2 (October 9th, 2024)
* Escape dots in SMTP transaction ID patterns
* Add link to [aboutmy.email](https://aboutmy.email) testing service in docs
* Add a more comprehensive example for using XOAUTH2 with gmail and Azure, thanks to @decomplexity
* Update Turkish, Spanish, Japanese, Russian, French translations
* Add Urdu & Kurdish (Sorani) translations
* Fix broken links in docs and comments, avoid http links, correct link to LGPL 2.1 license file
* Cleaner PSR-3 SMTP debug logging
* Bump GitHub action versions
* Fix error handler scope issue in POP3 and SMTP classes
* Numerous test improvements by @jrfnl
## Version 6.9.1 (November 25th, 2023)
* Finalise SendOauth2 example
## Version 6.9.0 (November 23rd, 2023)
* Add support for official release of PHP 8.3, add experimental support for PHP 8.4
* Add `clearCustomHeader` and `replaceCustomHeader` methods
* Add support for the XCLIENT SMTP extension with `setSMTPXclientAttribute` and `getSMTPXclientAttributes` methods
* Don't attempt opportunistic TLS when connecting to localhost
* Add package link and example showing how to use @decomplexity's SendOauth2 wrapper
* Update example to show a better way of using an SMTP subclass
* Avoid some more deprecation warnings
* Update Danish and Polish translations
* Add Bengali and Assamese translations
## Version 6.8.1 (August 29th, 2023)
* Don't reflect malformed DSNs in error messages to avert any risk of XSS
* Improve Simplified Chinese, Sinhalese, and Norwegian translations
* Don't use `setAccessible` in PHP >= 8.1 in tests
* Avoid a deprecation notice in PHP 8.3
* Fix link in readme
## Version 6.8.0 (March 6th, 2023)
* Add DSN parsing class, thanks to @voronkovich
* Fix some name edge cases, expand tests
* Add pattern for ZonMTA message IDs
* Improve Hindi translation
## Version 6.7.1 (December 8th, 2022)
* Add official support for PHP 8.2
* Add PHP 8.3 to test suite with "experimental" status
* Add ext-openssl to composer suggest list
* Bump development dependencies
## Version 6.7 (December 5th, 2022)
* Break out boundary definitions into a method (note that boundary format has also changed slightly)
* Remove MIME preamble to match popular client behaviour, may help with DKIM too
* Fix handling of trailing whitespace in simple DKIM canonicalisation
* Fix some possible POP3 auth issues, including a TCP hang (thanks to @czirkoszoltan)
* Add Azure XOAUTH2 example and docs (thanks to @greew)
* Preserve errors during disconnect
* Avoid some PHP 8.1 type issues
* Update CI to run on Ubuntu 22.04
## Version 6.6.5 (October 7th, 2022)
* Don't try to issue RSET if there has been a connection error
* Reject attempts to add folders as attachments
* Don't suppress earlier error messages on close()
* Handle Host === null better
* Update Danish and Polish translations
* Change recommendation for Microsoft OAuth package to thenetworg/oauth2-azure
* Bump some GitHub action versions
## Version 6.6.4 (August 22nd, 2022)
* Update Greek translation
* Add text/csv MIME type
* Fix DKIM when sending to anonymous group via mail()
* Improve docs around auth following gmail & MS deprecations
* Update GitHub action deps
* Add OpenSSF Scorecard security health metrics
## Version 6.6.3 (June 20th, 2022)
* Add an HTML form to the OAuth setup script
* Minor CS improvements
* Add Mongolian translation
* Remove bogus "ch" translation
## Version 6.6.2 (June 14th, 2022)
* Fix docs deployment GitHub action
* Updates to parallel-lint and console highlighter, thanks to @jrfnl
## Version 6.6.1 (June 14th, 2022) (unreleased)
* Don't clear errors on RSET, so they can still be obtained when using keepalive
* Bump some GitHub action versions
* Fix some tests
* 🇺🇦 Slava Ukraini!
## Version 6.6 (February 28th, 2022)
* Introduce interface for OAuth providers, making it easier to use OAuth libraries other than the League one, thanks to @pdscopes.
* Add more contextual information to TLS connection failure error messages, and throw exceptions on TLS connection errors, thanks to @miken32
## Version 6.5.4 (February 17th, 2022)
* If we can't use escaping functions, refuse to do unsafe things
* Avoid PHP 8.1 trim issue
* Add tests for XMailer
* Fix bug in use of CharSet property
* Fix bug in file upload example
* Update dev dependencies
## Version 6.5.3 (November 25th, 2021)
* Wrong commit tagged for the 6.5.2 release!
* Version file updated
## Version 6.5.2 (November 25th, 2021)
* Enable official support for PHP 8.1
* Enable experimental support for PHP 8.2
* Fix for PHP 5.6
* Fix for incorrect options for punyencoding IDNs
## Version 6.5.1 (August 18th, 2021)
* Provisional support for PHP 8.1
* Major overhaul of test suite
* Add codecov.io coverage reporting
* Prefer implicit TLS on port 465 as default encryption scheme in examples, as per RFC8314
* Fix potential noisy output from IMAP address parser
* Stricter checking of custom MessageID validity
* Replace invalid default From address
* Support fallback for languages, so a request for `pt_xx` will fall back to `pt` rather than the default `en`.
* Support multi-line RFC2047 addresses in parseAddresses
* Improved Japanese translation
Many thanks to @jrfnl for all her work.
## Version 6.5.0 (June 16th, 2021)
* **SECURITY** Fixes CVE-2021-34551, a complex RCE affecting Windows hosts. See [SECURITY.md](SECURITY.md) for details.
* The fix for this issue changes the way that language files are loaded. While they remain in the same PHP-like format, they are processed as plain text, and any code in them will not be run, including operations such as concatenation using the `.` operator.
* *Deprecation* The current translation file format using PHP arrays is now deprecated; the next major version will introduce a new format.
* **SECURITY** Fixes CVE-2021-3603 that may permit untrusted code to be run from an address validator. See [SECURITY.md](SECURITY.md) for details.
* The fix for this issue includes a minor BC break: callables injected into `validateAddress`, or indirectly through the `$validator` class property, may no longer be simple strings. If you want to inject your own validator, provide a closure instead of a function name.
* Haraka message ID strings are now recognised
## Version 6.4.1 (April 29th, 2021)
* **SECURITY** Fixes CVE-2020-36326, a regression of CVE-2018-19296 object injection introduced in 6.1.8, see SECURITY.md for details
* Reject more file paths that look like URLs, matching RFC3986 spec, blocking URLS using schemes such as `ssh2`
* Ensure method signature consistency in `doCallback` calls
* Ukrainian language update
* Add composer scripts for checking coding standards and running tests
## Version 6.4.0 (March 31st, 2021)
* Revert change that made the `mail()` and sendmail transports set the envelope sender if one isn't explicitly provided, as it causes problems described in <https://github.com/PHPMailer/PHPMailer/issues/2298>
* Check for mbstring extension before decoding addresss in `parseAddress`
* Add Serbian Latin translation (`sr_latn`)
* Enrol PHPMailer in Tidelift
## Version 6.3.0 (February 19th, 2021)
* Handle early connection errors such as 421 during connection and EHLO states
* Switch to GitHub Actions for CI
* Generate debug output for `mail()`, sendmail, and qmail transports. Enable using the same mechanism as for SMTP: set `SMTPDebug` > 0
* Make the `mail()` and sendmail transports set the envelope sender the same way as SMTP does, i.e. use whatever `From` is set to, only falling back to the `sendmail_from` php.ini setting if `From` is unset. This avoids errors from the `mail()` function if `Sender` is not set explicitly and php.ini is not configured. This is a minor functionality change, so bumps the minor version number.
* Extend `parseAddresses` to decode encoded names, improve tests
## Version 6.2.0
* PHP 8.0 compatibility, many thanks to @jrf_nl!
* Switch from PHP CS Fixer to PHP CodeSniffer for coding standards
* Create class constants for the debug levels in the POP3 class
* Improve French, Slovenian, and Ukrainian translations
* Improve file upload examples so file extensions are retained
* Resolve PHP 8 line break issues due to a very old PHP bug being fixed
* Avoid warnings when using old openssl functions
* Improve Travis-CI build configuration
## Version 6.1.8 (October 9th, 2020)
* Mark `ext-hash` as required in composer.json. This has long been required, but now it will cause an error at install time rather than runtime, making it easier to diagnose
* Make file upload examples safer
* Update links to SMTP testing servers
* Avoid errors when set_time_limit is disabled (you need better hosting!)
* Allow overriding auth settings for local tests; makes it easy to run tests using HELO
* Recover gracefully from errors during keepalive sessions
* Add AVIF MIME type mapping
* Prevent duplicate `To` headers in BCC-only messages when using `mail()`
* Avoid file function problems when attaching files from Windows UNC paths
* Improve German, Bahasa Indonesian, Filipino translations
* Add Javascript-based example
* Increased test coverage
## Version 6.1.7 (July 14th, 2020)
* Split SMTP connection into two separate methods
* Undo BC break in PHP versions 5.2.3 - 7.0.0 introduced in 6.1.2 when injecting callables for address validation and HTML to text conversion
* Save response to SMTP welcome banner as other responses are saved
* Retry stream_select if interrupted by a signal
## Version 6.1.6 (May 27th, 2020)
* **SECURITY** Fix insufficient output escaping bug in file attachment names. CVE-2020-13625. Reported by Elar Lang of Clarified Security.
* Correct Armenian ISO language code from `am` to `hy`, add mapping for fallback
* Use correct timeout property in debug output
## Version 6.1.5 (March 14th, 2020)
* Reject invalid custom headers that are empty or contain breaks
* Various fixes for DKIM issues, especially when using `mail()` transport
* Drop the `l=` length tag from DKIM signatures; it's a mild security risk
* Ensure CRLF is used explicitly when needed, rather than `static::$LE`
* Add a method for trimming header content consistently
* Some minor tweaks to resolve static analyser complaints
* Check that attachment files are readable both when adding *and* when sending
* Work around Outlook bug in mishandling MIME preamble
* Danish translation improvements
## Version 6.1.4 (December 10th, 2019)
* Clean up hostname handling
* Avoid IDN error on older PHP versions, prep for PHP 8.0
* Don't force RFC2047 folding unnecessarily
* Enable tests on full release of PHP 7.4
## Version 6.1.3 (November 21st, 2019)
* Fix an issue preventing injected debug handlers from working
* Fix an issue relating to connection timeout
* Add `SMTP::MAX_REPLY_LENGTH` constant
* Remove some dev dependencies; phpdoc no longer included
* Fix an issue where non-compliant servers returning bare codes caused an SMTP hang
## Version 6.1.2 (November 13th, 2019)
* Substantial revision of DKIM header generation
* Use shorter hashes for auto-generated CID values
* Fix format of content-id headers, and only use them for inline attachments
* Remove all use of XHTML
* Lots of coding standards cleanup
* API docs are now auto-updated via GitHub actions
* Fix header separation bug created in 6.1.1
* Fix misidentification of background attributes in SVG images in msgHTML
## Version 6.1.1 (September 27th 2019)
* Fix misordered version tag
## Version 6.1.0 (September 27th 2019)
* Multiple bug fixes for folding of long header lines, thanks to @caugner
* Add support for [RFC2387 child element content-type hint](https://www.rfc-editor.org/rfc/rfc2387#section-3.1) in `multipart/related` structures.
* Support for Ical event methods other than `REQUEST`, thanks to @puhr-mde
* Change header folding and param separation to use spaces instead of tabs
* Use ; to separate multiple MIME header params
* Add support for RFC3461 DSN messages
* IMAP example code fixed
* Use PHP temp streams instead of temp files
* Allow for longer SMTP error codes
* Updated Brazilian Portuguese translation
* Throw exceptions on invalid encoding values
* Add Afrikaans translation, thanks to @Donno191
* Updated Farsi/Persian translation
* Add PHP 7.4 to test config
* Remove some ambiguity about setting XMailer property
* Improve error checking in mailing list example
* Drop PHP 5.5 from CI config as it's no longer supported by Travis-CI
* Fix S/MIME signing
* Add constants for encryption type
* More consistent use of constants for encryption, charset, encoding
* Add PHPMailer logo images
## Version 6.0.7 (February 1st 2019)
* Include RedHat GPL Cooperation Commitment - see the `COMMITMENT` file for details.
* Don't exclude composer.json from git exports as it breaks composer updates in projects that use PHPMailer
* Updated Malay translation
* Fix language tests
## Version 6.0.6 (November 14th 2018)
* **SECURITY** Fix potential object injection vulnerability. Reported by Sehun Oh of cyberone.kr.
* Added Tagalog translation, thanks to @StoneArtz
* Added Malagache translation, thanks to @Hackinet
* Updated Serbian translation, fixed incorrect language code, thanks to @mmilanovic4
* Updated Arabic translations (@MicroDroid)
* Updated Hungarian translations
* Updated Dutch translations
* Updated Slovenian translation (@filips123)
* Updated Slovak translation (@pcmanik)
* Updated Italian translation (@sabas)
* Updated Norwegian translation (@aleskr)
* Updated Indonesian translation (@mylastof)
* Add constants for common values, such as `text/html` and `quoted-printable`, and use them
* Added support for copied headers in DKIM, helping with debugging, and an option to add extra headers to the DKIM signature. See DKIM_sign example for how to use them. Thanks to @gwi-mmuths.
* Add Campaign Monitor transaction ID pattern matcher
* Remove deprecated constant and ini values causing warnings in PHP 7.3, added PHP 7.3 build to Travis config.
* Expanded test coverage
## Version 5.2.27 (November 14th 2018)
* **SECURITY** Fix potential object injection vulnerability. Reported by Sehun Oh of cyberone.kr.
* Note that the 5.2 branch is now deprecated and will not receive security updates after 31st December 2018.
## Version 6.0.5 (March 27th 2018)
* Re-roll of 6.0.4 to fix missed version file entry. No code changes.
## Version 6.0.4 (March 27th 2018)
* Add some modern MIME types
* Add Hindi translation (thanks to @dextel2)
* Improve composer docs
* Fix generation of path to language files
## Version 6.0.3 (January 5th 2018)
* Correct DKIM canonicalization of line breaks for header & body - thanks to @themichaelhall
* Make dependence on ext-filter explicit in composer.json
@ -16,7 +351,7 @@
* Update license doc
* Updated upgrading docs
* Clarify `addStringEmbeddedImage` docs
* Hide auth credentials in all but lowest level debug output, prevents leakage in bug reports
* Hide auth credentials in all but lowest-level debug output, prevents leakage in bug reports
* Code style cleanup
## Version 6.0.1 (September 14th 2017)
@ -75,7 +410,7 @@ This is a major update that breaks backwards compatibility.
* Better handling of automatic transfer encoding switch in the presence of long lines
* Simplification of address validation - now uses PHP's `FILTER_VALIDATE_EMAIL` pattern by default, retains advanced options
* `Debugoutput` can accept a PSR-3 logger instance
* To reduce code footprint, the examples folder is no longer included in composer deployments or github zip files
* To reduce code footprint, the examples folder is no longer included in composer deployments or GitHub zip files
* Trap low-level errors in SMTP, reports via debug output
* More reliable folding of message headers
* Inject your own SMTP implementation via `setSMTPInstance()` instead of having to subclass and override `getSMTPInstance()`.
@ -89,7 +424,7 @@ This is a major update that breaks backwards compatibility.
* This is the last official release in the legacy PHPMailer 5.2 series; there may be future security patches (which will be found in the [5.2-stable branch](https://github.com/PHPMailer/PHPMailer/tree/5.2-stable)), but no further non-security PRs or issues will be accepted. Migrate to PHPMailer 6.0.
## Version 5.2.24 (July 26th 2017)
* **SECURITY** Fix XSS vulnerability in one of the code examples, [CVE-2017-11503](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2017-11503). The `code_generator.phps` example did not filter user input prior to output. This file is distributed with a `.phps` extension, so it it not normally executable unless it is explicitly renamed, so it is safe by default. There was also an undisclosed potential XSS vulnerability in the default exception handler (unused by default). Patches for both issues kindly provided by Patrick Monnerat of the Fedora Project.
* **SECURITY** Fix XSS vulnerability in one of the code examples, [CVE-2017-11503](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2017-11503). The `code_generator.phps` example did not filter user input prior to output. This file is distributed with a `.phps` extension, so it is not normally executable unless it is explicitly renamed, so it is safe by default. There was also an undisclosed potential XSS vulnerability in the default exception handler (unused by default). Patches for both issues kindly provided by Patrick Monnerat of the Fedora Project.
* Handle bare codes (an RFC contravention) in SMTP server responses
* Make message timestamps more dynamic - calculate the date separately for each message
* More thorough checks for reading attachments.
@ -518,10 +853,10 @@ All new documentation
* We have removed the /phpdoc from the downloads. All documentation is now on
the http://phpmailer.codeworxtech.com website.
## Version 2.2.1 () July 19 2008
## Version 2.2.1 (July 19, 2008)
* fixed line 1092 in class.smtp.php (my apologies, error on my part)
## Version 2.2 () July 15 2008
## Version 2.2 (July 15, 2008)
* Fixed redirect issue (display of UTF-8 in thank you redirect)
* fixed error in getResponse function declaration (class.pop3.php)
* PHPMailer now PHP6 compliant
@ -606,7 +941,7 @@ NOTE: will NOT work with PHP5 in E_STRICT error mode
## Version 1.73 (Sun, Jun 10 2005)
* Fixed denial of service bug: http://www.cybsec.com/vuln/PHPMailer-DOS.pdf
* Now has a total of 20 translations
* Fixed alt attachments bug: http://tinyurl.com/98u9k
* Fixed alt attachments bug: https://sourceforge.net/p/phpmailer/bugs/120/
## Version 1.72 (Wed, May 25 2004)
* Added Dutch, Swedish, Czech, Norwegian, and Turkish translations.
@ -723,7 +1058,7 @@ NOTE: will NOT work with PHP5 in E_STRICT error mode
## Version 1.19 (Thu, Jun 21 2001)
* Fixed MS Mail header bug
* Added fix for Bcc problem with mail(). *Does not work on Win32*
(See PHP bug report: http://www.php.net/bugs.php?id=11616)
(See PHP bug report: https://bugs.php.net/bug.php?id=11616
* mail() no longer passes a fifth parameter when not needed
## Version 1.15 (Fri, Jun 15 2001)

View File

@ -19,28 +19,48 @@
"name": "Brent R. Matzelle"
}
],
"funding": [
{
"url": "https://github.com/Synchro",
"type": "github"
}
],
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
},
"lock": false
},
"require": {
"php": ">=5.5.0",
"ext-ctype": "*",
"ext-filter": "*"
"ext-filter": "*",
"ext-hash": "*"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.2",
"phpdocumentor/phpdocumentor": "2.*",
"phpunit/phpunit": "^4.8 || ^5.7",
"zendframework/zend-serializer": "2.7.*",
"doctrine/annotations": "1.2.*",
"zendframework/zend-eventmanager": "3.0.*",
"zendframework/zend-i18n": "2.7.3"
"dealerdirect/phpcodesniffer-composer-installer": "^1.0",
"doctrine/annotations": "^1.2.6 || ^1.13.3",
"php-parallel-lint/php-console-highlighter": "^1.0.0",
"php-parallel-lint/php-parallel-lint": "^1.3.2",
"phpcompatibility/php-compatibility": "^10.0.0@dev",
"squizlabs/php_codesniffer": "^3.13.5",
"yoast/phpunit-polyfills": "^1.0.4"
},
"suggest": {
"psr/log": "For optional PSR-3 debug logging",
"league/oauth2-google": "Needed for Google XOAUTH2 authentication",
"decomplexity/SendOauth2": "Adapter for using XOAUTH2 authentication",
"ext-imap": "Needed to support advanced email address parsing according to RFC822",
"ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses",
"ext-openssl": "Needed for secure SMTP sending and DKIM signing",
"greew/oauth2-azure-provider": "Needed for Microsoft Azure XOAUTH2 authentication",
"hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication",
"stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication",
"ext-mbstring": "Needed to send email in multibyte encoding charset",
"symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)"
"league/oauth2-google": "Needed for Google XOAUTH2 authentication",
"psr/log": "For optional PSR-3 debug logging",
"symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)",
"thenetworg/oauth2-azure": "Needed for Microsoft XOAUTH2 authentication",
"directorytree/imapengine": "For uploading sent messages via IMAP, see gmail example"
},
"minimum-stability": "dev",
"prefer-stable": true,
"autoload": {
"psr-4": {
"PHPMailer\\PHPMailer\\": "src/"
@ -51,5 +71,14 @@
"PHPMailer\\Test\\": "test/"
}
},
"license": "LGPL-2.1"
"license": "LGPL-2.1-only",
"scripts": {
"check": "./vendor/bin/phpcs",
"style": "./vendor/bin/phpcbf",
"test": "./vendor/bin/phpunit --no-coverage",
"coverage": "./vendor/bin/phpunit",
"lint": [
"@php ./vendor/php-parallel-lint/php-parallel-lint/parallel-lint . --show-deprecated -e php,phps --exclude vendor --exclude .git --exclude build"
]
}
}

View File

@ -1,6 +1,8 @@
# PHPMailer Documentation
Pre-built PHPMailer API documentation is not provided with the PHP classes, but you can generate API documentation by running `phpdoc` in the top-level folder of this project, and documentation will be generated in this folder. You will need to have [phpDocumentor](https://www.phpdoc.org) installed, though you will already have that if you installed PHPMailer using composer with dev modules enabled. This documentation is also [available online](http://phpmailer.github.io/PHPMailer/), though it may not be quite up to date or match your version exactly. The configuration for phpdoc is in the [phpdoc.dist.xml file](https://github.com/PHPMailer/PHPMailer/blob/master/phpdoc.dist.xml).
Generated documentation for PHPMailer is [available online](https://phpmailer.github.io/PHPMailer/), and is regenerated automatically whenever changes are made.
Pre-built PHPMailer API documentation is not provided in this repo, but you can generate it by running `phpdoc` in the top-level folder of this project, and documentation will be generated in this `docs` folder. You will need to have [phpDocumentor](https://www.phpdoc.org) installed. The configuration for phpdoc is in the [phpdoc.dist.xml file](https://github.com/PHPMailer/PHPMailer/blob/master/phpdoc.dist.xml).
Further help and information is available in [the PHPMailer README](https://github.com/PHPMailer/PHPMailer/blob/master/README.md), [the examples folder](https://github.com/PHPMailer/PHPMailer/tree/master/examples), and in [the GitHub wiki](https://github.com/PHPMailer/PHPMailer/wiki).

View File

@ -1,18 +1,19 @@
<?php
/**
* This shows how to make a new public/private key pair suitable for use with DKIM.
* You should only need to do this once, and the public key (**not** the private key!)
* you generate should be inserted in your DNS matching the selector you want.
*
* You can also use the DKIM wizard here: https://www.port25.com/support/domainkeysdkim-wizard/
* You can also use the DKIM wizard here: https://www.sparkpost.com/resources/tools/dkim-wizard/
* but be aware that having your private key known anywhere outside your own server
* is a security risk, and it's easy enough to create your own on your own server.
*
* For security, any keys you create should not be accessible via your web site.
*
* 2048 bits is the recommended minimum key length - gmail won't accept less than 1024 bits.
* To test your DKIM config, use Port25's DKIM tester:
* https://www.port25.com/support/authentication-center/email-verification/
* To test your DKIM config, use Sparkpost's DKIM tester:
* https://tools.sparkpost.com/dkim
*
* Note that you only need a *private* key to *send* a DKIM-signed message,
* but receivers need your *public* key in order to verify it.
@ -25,10 +26,10 @@
$domain = 'example.com';
$selector = 'phpmailer';
//Path to your private key:
$privatekeyfile = 'dkim_private.pem';
//Path to your public key:
$publickeyfile = 'dkim_public.pem';
//Private key filename for this selector
$privatekeyfile = $selector . '_dkim_private.pem';
//Public key filename for this selector
$publickeyfile = $selector . '_dkim_public.pem';
if (file_exists($privatekeyfile)) {
echo "Using existing keys - if you want to generate new keys, delete old key files first.\n\n";
@ -54,11 +55,12 @@ if (file_exists($privatekeyfile)) {
echo "Private key (keep this private!):\n\n" . $privatekey;
echo "\n\nPublic key:\n\n" . $publickey;
//Prep public key for DNS, e.g.
//Prepare public key for DNS, e.g.
//phpmailer._domainkey.example.com IN TXT "v=DKIM1; h=sha256; t=s; p=" "MIIBIjANBg...oXlwIDAQAB"...
$dnskey = "$selector._domainkey.$domain IN TXT";
//Some DNS server don't like ; chars unless backslash-escaped
$dnsvalue = '"v=DKIM1\; h=sha256\; t=s\; p=" ';
$dnsvalue = '"v=DKIM1; h=sha256; t=s; p=" ';
//Some DNS servers don't like ;(semi colon) chars unless backslash-escaped
$dnsvalue2 = '"v=DKIM1\; h=sha256\; t=s\; p=" ';
//Strip and split the key into smaller parts and format for DNS
//Many DNS systems don't like long TXT entries
@ -72,6 +74,8 @@ $keyparts = str_split($publickey, 253); //Becomes 255 when quotes are included
//Quote each chunk
foreach ($keyparts as $keypart) {
$dnsvalue .= '"' . trim($keypart) . '" ';
$dnsvalue2 .= '"' . trim($keypart) . '" ';
}
echo "\n\nDNS key:\n\n" . trim($dnskey);
echo "\n\nDNS value:\n\n" . trim($dnsvalue);
echo "\n\nDNS value (with escaping):\n\n" . trim($dnsvalue2);

View File

@ -1,7 +1,8 @@
<?php
/**
* This example shows sending a DKIM-signed message with PHPMailer.
* More info about DKIM can be found here: http://www.dkim.org/info/dkim-faq.html
* More info about DKIM can be found here: https://www.dkim.org/info/dkim-faq.html
* There's more to using DKIM than just this code - check out this article:
* @see https://yomotherboard.com/how-to-setup-email-server-dkim-keys/
* See also the DKIM_gen_keys example code in the examples folder,
@ -14,7 +15,7 @@ use PHPMailer\PHPMailer\PHPMailer;
require '../vendor/autoload.php';
//Usual setup
$mail = new PHPMailer;
$mail = new PHPMailer();
$mail->setFrom('from@example.com', 'First Last');
$mail->addAddress('whoto@example.com', 'John Doe');
$mail->Subject = 'PHPMailer mail() test';
@ -32,10 +33,14 @@ $mail->DKIM_selector = 'phpmailer';
$mail->DKIM_passphrase = '';
//The identity you're signing as - usually your From address
$mail->DKIM_identity = $mail->From;
//Suppress listing signed header fields in signature, defaults to true for debugging purpose
$mail->DKIM_copyHeaderFields = false;
//Optionally you can add extra headers for signing to meet special requirements
$mail->DKIM_extraHeaders = ['List-Unsubscribe', 'List-Help'];
//When you send, the DKIM settings will be used to sign the message
if (!$mail->send()) {
echo "Mailer Error: " . $mail->ErrorInfo;
echo 'Mailer Error: ' . $mail->ErrorInfo;
} else {
echo "Message sent!";
echo 'Message sent!';
}

View File

@ -1,4 +1,5 @@
# PHPMailer code examples[![PHPMailer logo](images/phpmailer.png)](https://github.com/PHPMailer/PHPMailer)
[![PHPMailer logo](images/phpmailer.png)](https://github.com/PHPMailer/PHPMailer)
# PHPMailer code examples
This folder contains a collection of examples of using [PHPMailer](https://github.com/PHPMailer/PHPMailer).
@ -6,24 +7,22 @@ This folder contains a collection of examples of using [PHPMailer](https://githu
When working on email sending code you'll find yourself worrying about what might happen if all these test emails got sent to your mailing list. The solution is to use a fake mail server, one that acts just like the real thing, but just doesn't actually send anything out. Some offer web interfaces, feedback, logging, the ability to return specific error codes, all things that are useful for testing error handling, authentication etc. Here's a selection of mail testing tools you might like to try:
* [FakeSMTP](https://github.com/Nilhcem/FakeSMTP), a Java desktop app with the ability to show an SMTP log and save messages to a folder.
* [FakeEmail](https://github.com/isotoma/FakeEmail), a Python-based fake mail server with a web interface.
* [smtp-sink](http://www.postfix.org/smtp-sink.1.html), part of the Postfix mail server, so you may have this installed already. This is used in the Travis-CI configuration to run PHPMailer's unit tests.
* [smtp4dev](http://smtp4dev.codeplex.com), a dummy SMTP server for Windows.
* [FakeEmail](https://github.com/tomwardill/FakeEmail), a Python-based fake mail server with a web interface.
* [smtp-sink](https://www.postfix.org/smtp-sink.1.html), part of the Postfix mail server, so you may have this installed already. This is used in the GitHub actions configuration to run PHPMailer's unit tests.
* [smtp4dev](https://github.com/rnwood/smtp4dev), a dummy SMTP server for Windows and Linux.
* [fakesendmail.sh](https://github.com/PHPMailer/PHPMailer/blob/master/test/fakesendmail.sh), part of PHPMailer's test setup, this is a shell script that emulates sendmail for testing 'mail' or 'sendmail' methods in PHPMailer.
* [msglint](http://tools.ietf.org/tools/msglint/), not a mail server, the IETF's MIME structure analyser checks the formatting of your messages.
* [HELO](https://usehelo.com), a very nice (commercial) mail server desktop app from BeyondCode, and [how to set it up for local testing](https://usehelo.com/blog/how-to-use-helo-with-phps-mail-function).
* [msglint](https://www.splitbrain.org/_static/msglint/), not a mail server, the IETF's MIME structure analyser checks the formatting of your messages.
* [MailHog](https://github.com/les-enovateurs/mailhog-examples), a Go-based email testing tool for developers with a web interface. You can use it with Docker and GitHub Actions to test your mails. The repository also contains a small part of PHPMailer's setup.
* [aboutmy.email](https://aboutmy.email), a service for evaluating your email config SPF, DKIM, DMARC, and compliance with list-unsubscribe, TLS, and many other settings.
Most of these examples use the `example.com` and `example.net` domains. These domains are reserved by IANA for illustrative purposes, as documented in [RFC 2606](http://tools.ietf.org/html/rfc2606). Don't use made-up domains like 'mydomain.com' or 'somedomain.com' in examples as someone, somewhere, probably owns them!
Most of these examples use the `example.com` and `example.net` domains. These domains are reserved by IANA for illustrative purposes, as documented in [RFC 2606](https://www.rfc-editor.org/rfc/rfc2606). Don't use made-up domains like 'mydomain.com' or 'somedomain.com' in examples as someone, somewhere, probably owns them!
## Security note
Before running these examples in a web server, you'll need to rename them with '.php' extensions. They are supplied as '.phps' files which will usually be displayed with syntax highlighting by PHP instead of running them. This prevents potential security issues with running potential spam-gateway code if you happen to deploy these code examples on a live site - _please don't do that!_
Similarly, don't leave your passwords in these files as they will be visible to the world!
## [code_generator.phps](code_generator.phps)
This script is a simple code generator - fill in the form and hit submit, and it will use what you entered to email you a message, and will also generate PHP code using your settings that you can copy and paste to use in your own apps.
## [mail.phps](mail.phps)
This is a basic example which creates an email message from an external HTML file, creates a plain text body, sets various addresses, adds an attachment and sends the message. It uses PHP's built-in mail() function which is the simplest to use, but relies on the presence of a local mail server, something which is not usually available on Windows. If you find yourself in that situation, either install a local mail server, or use a remote one and send using SMTP instead.

126
examples/azure_xoauth2.phps Normal file
View File

@ -0,0 +1,126 @@
<?php
/**
* This example shows how to send via Microsoft Outlook's servers using XOAUTH2 authentication
* using the league/oauth2-client to provide the OAuth2 token.
* To use a different OAuth2 library create a wrapper class that implements OAuthTokenProvider and
* pass that wrapper class to PHPMailer::setOAuth().
*/
//Import PHPMailer classes into the global namespace
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;
use PHPMailer\PHPMailer\OAuth;
//Alias the League Google OAuth2 provider class
use Greew\OAuth2\Client\Provider\Azure;
//SMTP needs accurate times, and the PHP time zone MUST be set
//This should be done in your php.ini, but this is how to do it if you don't have access to that
date_default_timezone_set('Etc/UTC');
//Load dependencies from composer
//If this causes an error, run 'composer install'
require '../vendor/autoload.php';
//Create a new PHPMailer instance
$mail = new PHPMailer();
//Tell PHPMailer to use SMTP
$mail->isSMTP();
//Enable SMTP debugging
//SMTP::DEBUG_OFF = off (for production use)
//SMTP::DEBUG_CLIENT = client messages
//SMTP::DEBUG_SERVER = client and server messages
$mail->SMTPDebug = SMTP::DEBUG_SERVER;
//Set the hostname of the mail server
$mail->Host = 'smtp.office365.com';
//Set the SMTP port number:
// - 465 for SMTP with implicit TLS, a.k.a. RFC8314 SMTPS or
// - 587 for SMTP+STARTTLS
$mail->Port = 587;
//Set the encryption mechanism to use:
// - SMTPS (implicit TLS on port 465) or
// - STARTTLS (explicit TLS on port 587)
$mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;
//Whether to use SMTP authentication
$mail->SMTPAuth = true;
//Set AuthType to use XOAUTH2
$mail->AuthType = 'XOAUTH2';
//Start Option 1: Use league/oauth2-client as OAuth2 token provider
//Fill in authentication details here
//Either the microsoft account owner, or the user that gave consent
$email = 'someone@somemicrosoftaccount.com';
$clientId = 'RANDOMCHARS-----duv1n2TS';
$clientSecret = 'RANDOMCHARS-----lGyjPcRtvP';
$tenantId = 'RANDOMCHARS-----HSFTAOIlagss';
//Obtained by configuring and running get_oauth_token.php
//after setting up an app in Google Developer Console.
$refreshToken = 'RANDOMCHARS-----DWxgOvPT003r-yFUV49TQYag7_Aod7y0';
//Create a new OAuth2 provider instance
$provider = new Azure(
[
'clientId' => $clientId,
'clientSecret' => $clientSecret,
'tenantId' => $tenantId,
]
);
//Pass the OAuth provider instance to PHPMailer
$mail->setOAuth(
new OAuth(
[
'provider' => $provider,
'clientId' => $clientId,
'clientSecret' => $clientSecret,
'refreshToken' => $refreshToken,
'userName' => $email,
]
)
);
//End Option 1
//Option 2: Another OAuth library as OAuth2 token provider
//Set up the other oauth library as per its documentation
//Then create the wrapper class that implementations OAuthTokenProvider
$oauthTokenProvider = new MyOAuthTokenProvider(/* Email, ClientId, ClientSecret, etc. */);
//Pass the implementation of OAuthTokenProvider to PHPMailer
$mail->setOAuth($oauthTokenProvider);
//End Option 2
//Set who the message is to be sent from
//For Outlook, this generally needs to be the same as the user you logged in as
$mail->setFrom($email, 'First Last');
//Set who the message is to be sent to
$mail->addAddress('someone@someserver.com', 'John Doe');
//Set the subject line
$mail->Subject = 'PHPMailer Outlook XOAUTH2 SMTP test';
//Read an HTML message body from an external file, convert referenced images to embedded,
//convert HTML into a basic plain-text alternative body
$mail->CharSet = PHPMailer::CHARSET_UTF8;
$mail->msgHTML(file_get_contents('contentsutf8.html'), __DIR__);
//Replace the plain text body with one created manually
$mail->AltBody = 'This is a plain-text message body';
//Attach an image file
$mail->addAttachment('images/phpmailer_mini.png');
//send the message, check for errors
if (!$mail->send()) {
echo 'Mailer Error: ' . $mail->ErrorInfo;
} else {
echo 'Message sent!';
}

View File

@ -1,4 +1,5 @@
<?php
/**
* This example shows how to use a callback function from PHPMailer.
*/
@ -42,7 +43,7 @@ function callbackAction($result, $to, $cc, $bcc, $subject, $body)
require_once '../vendor/autoload.php';
$mail = new PHPMailer;
$mail = new PHPMailer();
try {
$mail->isMail();
@ -51,9 +52,9 @@ try {
$mail->addCC('john@example.com', 'John Doe');
$mail->Subject = 'PHPMailer Test Subject';
$mail->msgHTML(file_get_contents('../examples/contents.html'));
// optional - msgHTML will create an alternate automatically
//Optional - msgHTML will create an alternate automatically
$mail->AltBody = 'To view the message, please use an HTML compatible email viewer!';
$mail->addAttachment('images/phpmailer_mini.png'); // attachment
$mail->addAttachment('images/phpmailer_mini.png');
$mail->action_function = 'callbackAction';
$mail->send();
} catch (Exception $e) {
@ -62,7 +63,7 @@ try {
//Alternative approach using a closure
try {
$mail->action_function = function ($result, $to, $cc, $bcc, $subject, $body) {
$mail->action_function = static function ($result, $to, $cc, $bcc, $subject, $body) {
if ($result) {
echo "Message sent successfully\n";
} else {

View File

@ -0,0 +1,146 @@
<?php
/**
* This example shows how to handle a simple contact form safely.
*/
//Import PHPMailer class into the global namespace
use PHPMailer\PHPMailer\PHPMailer;
//Don't run this unless we're handling a form submission
if (array_key_exists('email', $_POST)) {
date_default_timezone_set('Etc/UTC');
require '../vendor/autoload.php';
$isAjax = !empty($_SERVER['HTTP_X_REQUESTED_WITH']) &&
strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) === 'xmlhttprequest';
//Create a new PHPMailer instance
$mail = new PHPMailer();
//Send using SMTP to localhost (faster and safer than using mail()) requires a local mail server
//See other examples for how to use a remote server such as gmail
$mail->isSMTP();
$mail->Host = 'localhost';
$mail->Port = 25;
//Use a fixed address in your own domain as the from address
//**DO NOT** use the submitter's address here as it will be forgery
//and will cause your messages to fail SPF checks
$mail->setFrom('from@example.com', 'First Last');
//Choose who the message should be sent to
//You don't have to use a <select> like in this example, you can simply use a fixed address
//the important thing is *not* to trust an email address submitted from the form directly,
//as an attacker can substitute their own and try to use your form to send spam
$addresses = [
'sales' => 'sales@example.com',
'support' => 'support@example.com',
'accounts' => 'accounts@example.com',
];
//Validate address selection before trying to use it
if (array_key_exists('dept', $_POST) && array_key_exists($_POST['dept'], $addresses)) {
$mail->addAddress($addresses[$_POST['dept']]);
} else {
//Fall back to a fixed address if dept selection is invalid or missing
$mail->addAddress('support@example.com');
}
//Put the submitter's address in a reply-to header
//This will fail if the address provided is invalid,
//in which case we should ignore the whole request
if ($mail->addReplyTo($_POST['email'], $_POST['name'])) {
$mail->Subject = 'PHPMailer contact form';
//Keep it simple - don't use HTML
$mail->isHTML(false);
//Build a simple message body
$mail->Body = <<<EOT
Email: {$_POST['email']}
Name: {$_POST['name']}
Message: {$_POST['message']}
EOT;
//Send the message, check for errors
if (!$mail->send()) {
//The reason for failing to send will be in $mail->ErrorInfo
//but it's unsafe to display errors directly to users - process the error, log it on your server.
if ($isAjax) {
http_response_code(500);
}
$response = [
"status" => false,
"message" => 'Sorry, something went wrong. Please try again later.'
];
} else {
$response = [
"status" => true,
"message" => 'Message sent! Thanks for contacting us.'
];
}
} else {
$response = [
"status" => false,
"message" => 'Invalid email address, message ignored.'
];
}
if ($isAjax) {
header('Content-type:application/json;charset=utf-8');
echo json_encode($response);
exit();
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Contact form</title>
</head>
<body>
<h1>Contact us</h1>
<h2 id="status-message"><?php if (isset($response)) {
echo $response['message'];
}?></h2>
<form method="POST" id="contact-form">
<label for="name">Name: <input type="text" name="name" id="name"></label><br>
<label for="email">Email address: <input type="email" name="email" id="email"></label><br>
<label for="message">Message: <textarea name="message" id="message" rows="8" cols="20"></textarea></label><br>
<label for="dept">Send query to department:</label>
<select name="dept" id="dept">
<option value="sales">Sales</option>
<option value="support" selected>Technical support</option>
<option value="accounts">Accounts</option>
</select><br>
<input type="submit" value="Send">
</form>
<script type="application/javascript">
const form = document.getElementById("contact-form")
function email(data) {
const message = document.getElementById("status-message")
fetch("", {
method: "POST",
body: data,
headers: {
'X-Requested-With' : 'XMLHttpRequest'
}
})
.then(response => response.json())
.then(response => {message.innerHTML = response.message})
.catch(error => {
error.json().then(response => {
message.innerHTML = response.message
})
})
}
const submitEvent = form.addEventListener("submit", (event) => {
event.preventDefault();
const formData = new FormData(form);
email(formData);
})
</script>
</body>
</html>

View File

@ -1,19 +1,23 @@
<?php
/**
* This example shows how to handle a simple contact form.
* This example shows how to handle a simple contact form safely.
*/
//Import PHPMailer class into the global namespace
use PHPMailer\PHPMailer\PHPMailer;
$msg = '';
//Don't run this unless we're handling a form submission
if (array_key_exists('email', $_POST)) {
date_default_timezone_set('Etc/UTC');
require '../PHPMailerAutoload.php';
require '../vendor/autoload.php';
//Create a new PHPMailer instance
$mail = new PHPMailer;
//Tell PHPMailer to use SMTP - requires a local mail server
//Faster and safer than using mail()
$mail = new PHPMailer();
//Send using SMTP to localhost (faster and safer than using mail()) requires a local mail server
//See other examples for how to use a remote server such as gmail
$mail->isSMTP();
$mail->Host = 'localhost';
$mail->Port = 25;
@ -22,8 +26,22 @@ if (array_key_exists('email', $_POST)) {
//**DO NOT** use the submitter's address here as it will be forgery
//and will cause your messages to fail SPF checks
$mail->setFrom('from@example.com', 'First Last');
//Send the message to yourself, or whoever should receive contact for submissions
$mail->addAddress('whoto@example.com', 'John Doe');
//Choose who the message should be sent to
//You don't have to use a <select> like in this example, you can simply use a fixed address
//the important thing is *not* to trust an email address submitted from the form directly,
//as an attacker can substitute their own and try to use your form to send spam
$addresses = [
'sales' => 'sales@example.com',
'support' => 'support@example.com',
'accounts' => 'accounts@example.com',
];
//Validate address selection before trying to use it
if (array_key_exists('dept', $_POST) && array_key_exists($_POST['dept'], $addresses)) {
$mail->addAddress($addresses[$_POST['dept']]);
} else {
//Fall back to a fixed address if dept selection is invalid or missing
$mail->addAddress('support@example.com');
}
//Put the submitter's address in a reply-to header
//This will fail if the address provided is invalid,
//in which case we should ignore the whole request
@ -40,7 +58,7 @@ EOT;
//Send the message, check for errors
if (!$mail->send()) {
//The reason for failing to send will be in $mail->ErrorInfo
//but you shouldn't display errors to users - process the error, log it on your server.
//but it's unsafe to display errors directly to users - process the error, log it on your server.
$msg = 'Sorry, something went wrong. Please try again later.';
} else {
$msg = 'Message sent! Thanks for contacting us.';
@ -65,6 +83,12 @@ EOT;
<label for="name">Name: <input type="text" name="name" id="name"></label><br>
<label for="email">Email address: <input type="email" name="email" id="email"></label><br>
<label for="message">Message: <textarea name="message" id="message" rows="8" cols="20"></textarea></label><br>
<label for="dept">Send query to department:</label>
<select name="dept" id="dept">
<option value="sales">Sales</option>
<option value="support" selected>Technical support</option>
<option value="accounts">Accounts</option>
</select><br>
<input type="submit" value="Send">
</form>
</body>

View File

@ -1,5 +1,5 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>PHPMailer Test</title>

View File

@ -1,5 +1,5 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>PHPMailer Test</title>
@ -10,7 +10,7 @@
<div align="center">
<a href="https://github.com/PHPMailer/PHPMailer/"><img src="images/phpmailer.png" height="90" width="340" alt="PHPMailer rocks"></a>
</div>
<p>This example uses <strong>HTML</strong> with the UTF-8 unicode charset.</p>
<p>This example uses <strong>HTML</strong> with the UTF-8 Unicode charset.</p>
<p>Chinese text: 郵件內容為空</p>
<p>Russian text: Пустое тело сообщения</p>
<p>Armenian text: Հաղորդագրությունը դատարկ է</p>

View File

@ -1,4 +1,5 @@
<?php
/**
* This example shows how to make use of PHPMailer's exceptions for error handling.
*/

View File

@ -1,4 +1,5 @@
<?php
/**
* This example shows how to extend PHPMailer to simplify your coding.
* If PHPMailer doesn't do something the way you want it to, or your code
@ -9,6 +10,7 @@
//Import PHPMailer classes into the global namespace
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;
use PHPMailer\PHPMailer\Exception;
require '../vendor/autoload.php';
@ -16,7 +18,7 @@ require '../vendor/autoload.php';
/**
* Use PHPMailer as a base class and extend it
*/
class myPHPMailer extends PHPMailer
class MyPHPMailer extends PHPMailer
{
/**
* myPHPMailer constructor.
@ -37,9 +39,9 @@ class myPHPMailer extends PHPMailer
//Set an HTML and plain-text body, import relative image references
$this->msgHTML($body, './images/');
//Show debug output
$this->SMTPDebug = 2;
$this->SMTPDebug = SMTP::DEBUG_SERVER;
//Inject a new debug output handler
$this->Debugoutput = function ($str, $level) {
$this->Debugoutput = static function ($str, $level) {
echo "Debug level $level; message: $str\n";
};
}
@ -49,7 +51,7 @@ class myPHPMailer extends PHPMailer
{
$this->Subject = '[Yay for me!] ' . $this->Subject;
$r = parent::send();
echo "I sent a message with subject " . $this->Subject;
echo 'I sent a message with subject ' . $this->Subject;
return $r;
}
@ -59,12 +61,12 @@ class myPHPMailer extends PHPMailer
try {
//Instantiate your new class, making use of the new `$body` parameter
$mail = new myPHPMailer(true, '<strong>This is the message body</strong>');
// Now you only need to set things that are different from the defaults you defined
//Now you only need to set things that are different from the defaults you defined
$mail->addAddress('jane@example.com', 'Jane User');
$mail->Subject = 'Here is the subject';
$mail->addAttachment(__FILE__, 'myPHPMailer.php');
$mail->send(); //no need to check for errors - the exception handler will do it
$mail->send(); //No need to check for errors - the exception handler will do it
} catch (Exception $e) {
//Note that this is catching the PHPMailer Exception class, not the global \Exception type!
echo "Caught a " . get_class($e) . ": " . $e->getMessage();
echo 'Caught a ' . get_class($e) . ': ' . $e->getMessage();
}

View File

@ -1,4 +1,5 @@
<?php
/**
* This example shows settings to use when sending via Google's Gmail servers.
* This uses traditional id & password authentication - look at the gmail_xoauth.phps
@ -8,46 +9,55 @@
//Import PHPMailer classes into the global namespace
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;
require '../vendor/autoload.php';
//Create a new PHPMailer instance
$mail = new PHPMailer;
$mail = new PHPMailer();
//Tell PHPMailer to use SMTP
$mail->isSMTP();
//Enable SMTP debugging
// 0 = off (for production use)
// 1 = client messages
// 2 = client and server messages
$mail->SMTPDebug = 2;
//SMTP::DEBUG_OFF = off (for production use)
//SMTP::DEBUG_CLIENT = client messages
//SMTP::DEBUG_SERVER = client and server messages
$mail->SMTPDebug = SMTP::DEBUG_SERVER;
//Set the hostname of the mail server
$mail->Host = 'smtp.gmail.com';
// use
// $mail->Host = gethostbyname('smtp.gmail.com');
// if your network does not support SMTP over IPv6
//Use `$mail->Host = gethostbyname('smtp.gmail.com');`
//if your network does not support SMTP over IPv6,
//though this may cause issues with TLS
//Set the SMTP port number - 587 for authenticated TLS, a.k.a. RFC4409 SMTP submission
$mail->Port = 587;
//Set the SMTP port number:
// - 465 for SMTP with implicit TLS, a.k.a. RFC8314 SMTPS or
// - 587 for SMTP+STARTTLS
$mail->Port = 465;
//Set the encryption system to use - ssl (deprecated) or tls
$mail->SMTPSecure = 'tls';
//Set the encryption mechanism to use:
// - SMTPS (implicit TLS on port 465) or
// - STARTTLS (explicit TLS on port 587)
$mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS;
//Whether to use SMTP authentication
$mail->SMTPAuth = true;
//Username to use for SMTP authentication - use full email address for gmail
$mail->Username = "username@gmail.com";
$mail->Username = 'username@gmail.com';
//Password to use for SMTP authentication
$mail->Password = "yourpassword";
$mail->Password = 'yourpassword';
//Set who the message is to be sent from
//Note that with gmail you can only use your account address (same as `Username`)
//or predefined aliases that you have configured within your account.
//Do not use user-submitted addresses in here
$mail->setFrom('from@example.com', 'First Last');
//Set an alternative reply-to address
//This is a good place to put user-submitted addresses
$mail->addReplyTo('replyto@example.com', 'First Last');
//Set who the message is to be sent to
@ -68,31 +78,29 @@ $mail->addAttachment('images/phpmailer_mini.png');
//send the message, check for errors
if (!$mail->send()) {
echo "Mailer Error: " . $mail->ErrorInfo;
echo 'Mailer Error: ' . $mail->ErrorInfo;
} else {
echo "Message sent!";
echo 'Message sent!';
//Section 2: IMAP
//Uncomment these to save your message in the 'Sent Mail' folder.
#if (save_mail($mail)) {
# echo "Message saved!";
#}
#save_mail($mail->getSentMIMEMessage());
}
//Section 2: IMAP
//IMAP commands requires the PHP IMAP Extension, found at: https://php.net/manual/en/imap.setup.php
//Function to call which uses the PHP imap_*() functions to save messages: https://php.net/manual/en/book.imap.php
//You can use imap_getmailboxes($imapStream, '/imap/ssl') to get a list of available folders or labels, this can
//be useful if you are trying to get this working on a non-Gmail IMAP server.
function save_mail($mail)
//This example uses the directorytree/imapengine IMAP library: https://imapengine.com
//Earlier versions of this code used the deprecated PHP imap_* functions.
function save_mail($message)
{
//You can change 'Sent Mail' to any other folder or tag
$path = "{imap.gmail.com:993/imap/ssl}[Gmail]/Sent Mail";
$mailbox = new \DirectoryTree\ImapEngine\Mailbox([
'host' => 'imap.gmail.com',
'port' => 993,
'encryption' => 'ssl',
'username' => 'user@example.com',
'password' => 'password',
]);
//Tell your server to open an IMAP connection using the same username and password as you used for SMTP
$imapStream = imap_open($path, $mail->Username, $mail->Password);
// Find the "sent" messages folder yours may have a different name.
$folder = $mailbox->folders()->find('Sent Mail');
$result = imap_append($imapStream, $path, $mail->getSentMIMEMessage());
imap_close($imapStream);
return $result;
$folder->messages()->append($message);
}

View File

@ -1,13 +1,17 @@
<?php
/**
* This example shows how to send via Google's Gmail servers using XOAUTH2 authentication.
* This example shows how to send via Google's Gmail servers using XOAUTH2 authentication
* using the league/oauth2-client to provide the OAuth2 token.
* To use a different OAuth2 library create a wrapper class that implements OAuthTokenProvider and
* pass that wrapper class to PHPMailer::setOAuth().
*/
//Import PHPMailer classes into the global namespace
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;
use PHPMailer\PHPMailer\OAuth;
// Alias the League Google OAuth2 provider class
//Alias the League Google OAuth2 provider class
use League\OAuth2\Client\Provider\Google;
//SMTP needs accurate times, and the PHP time zone MUST be set
@ -19,25 +23,29 @@ date_default_timezone_set('Etc/UTC');
require '../vendor/autoload.php';
//Create a new PHPMailer instance
$mail = new PHPMailer;
$mail = new PHPMailer();
//Tell PHPMailer to use SMTP
$mail->isSMTP();
//Enable SMTP debugging
// 0 = off (for production use)
// 1 = client messages
// 2 = client and server messages
$mail->SMTPDebug = 2;
//SMTP::DEBUG_OFF = off (for production use)
//SMTP::DEBUG_CLIENT = client messages
//SMTP::DEBUG_SERVER = client and server messages
$mail->SMTPDebug = SMTP::DEBUG_SERVER;
//Set the hostname of the mail server
$mail->Host = 'smtp.gmail.com';
//Set the SMTP port number - 587 for authenticated TLS, a.k.a. RFC4409 SMTP submission
$mail->Port = 587;
//Set the SMTP port number:
// - 465 for SMTP with implicit TLS, a.k.a. RFC8314 SMTPS or
// - 587 for SMTP+STARTTLS
$mail->Port = 465;
//Set the encryption system to use - ssl (deprecated) or tls
$mail->SMTPSecure = 'tls';
//Set the encryption mechanism to use:
// - SMTPS (implicit TLS on port 465) or
// - STARTTLS (explicit TLS on port 587)
$mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS;
//Whether to use SMTP authentication
$mail->SMTPAuth = true;
@ -45,6 +53,7 @@ $mail->SMTPAuth = true;
//Set AuthType to use XOAUTH2
$mail->AuthType = 'XOAUTH2';
//Start Option 1: Use league/oauth2-client as OAuth2 token provider
//Fill in authentication details here
//Either the gmail account owner, or the user that gave consent
$email = 'someone@gmail.com';
@ -75,6 +84,16 @@ $mail->setOAuth(
]
)
);
//End Option 1
//Option 2: Another OAuth library as OAuth2 token provider
//Set up the other oauth library as per its documentation
//Then create the wrapper class that implements OAuthTokenProvider
$oauthTokenProvider = new MyOAuthTokenProvider(/* Email, ClientId, ClientSecret, etc. */);
//Pass the implementation of OAuthTokenProvider to PHPMailer
$mail->setOAuth($oauthTokenProvider);
//End Option 2
//Set who the message is to be sent from
//For gmail, this generally needs to be the same as the user you logged in as
@ -88,18 +107,15 @@ $mail->Subject = 'PHPMailer GMail XOAUTH2 SMTP test';
//Read an HTML message body from an external file, convert referenced images to embedded,
//convert HTML into a basic plain-text alternative body
$mail->CharSet = 'utf-8';
$mail->CharSet = PHPMailer::CHARSET_UTF8;
$mail->msgHTML(file_get_contents('contentsutf8.html'), __DIR__);
//Replace the plain text body with one created manually
$mail->AltBody = 'This is a plain-text message body';
//Attach an image file
$mail->addAttachment('images/phpmailer_mini.png');
//send the message, check for errors
if (!$mail->send()) {
echo "Mailer Error: " . $mail->ErrorInfo;
echo 'Mailer Error: ' . $mail->ErrorInfo;
} else {
echo "Message sent!";
echo 'Message sent!';
}

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

View File

@ -0,0 +1,209 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 1280 640" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
<g id="Background" transform="matrix(8.70744,5.33177e-16,-5.33177e-16,-4.35372,-4208.74,2147.69)">
<path d="M630.351,346.3L483.35,346.3L483.35,493.301L630.351,493.301L630.351,346.3L630.351,346.3Z" style="fill:rgb(51,51,51);fill-rule:nonzero;"/>
</g>
<g id="PHPMailer" transform="matrix(0.986688,0,0,0.986688,12.9314,1.29196)">
<g transform="matrix(1.14074,0,0,1,-76.5738,0)">
<g id="path68" transform="matrix(2.14981,0,0,-2.46335,-776.134,1230.68)">
<path d="M614.574,416.832L584.18,445.184L584.18,381.999L644.963,381.999L644.963,445.181L614.574,416.832Z" style="fill:rgb(248,203,102);fill-rule:nonzero;"/>
</g>
<g id="path74" transform="matrix(2.14981,0,0,-2.56665,-776.135,1278.22)">
<path d="M644.989,460.2L584.155,460.2L614.574,432.967L644.989,460.2Z" style="fill:rgb(248,203,102);fill-rule:nonzero;"/>
</g>
</g>
<g>
<g transform="matrix(260.4,0,0,280,52.6877,289.686)">
<path d="M0.488,-0.47C0.488,-0.441 0.484,-0.412 0.476,-0.385C0.468,-0.357 0.455,-0.333 0.439,-0.312C0.422,-0.29 0.4,-0.274 0.374,-0.261C0.348,-0.248 0.318,-0.242 0.282,-0.242L0.173,-0.242L0.173,0L0.055,0L0.055,-0.688L0.277,-0.688C0.314,-0.688 0.345,-0.683 0.371,-0.672C0.398,-0.662 0.419,-0.647 0.437,-0.627C0.454,-0.608 0.467,-0.585 0.476,-0.559C0.484,-0.532 0.488,-0.502 0.488,-0.47ZM0.369,-0.468C0.369,-0.503 0.36,-0.53 0.343,-0.549C0.326,-0.567 0.299,-0.576 0.264,-0.576L0.173,-0.576L0.173,-0.353L0.268,-0.353C0.285,-0.353 0.3,-0.356 0.313,-0.361C0.326,-0.367 0.336,-0.375 0.345,-0.385C0.353,-0.395 0.359,-0.407 0.363,-0.421C0.367,-0.435 0.369,-0.451 0.369,-0.468Z" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(260.4,0,0,280,184.157,289.686)">
<path d="M0.38,0L0.38,-0.273L0.173,-0.273L0.173,0L0.055,0L0.055,-0.688L0.173,-0.688L0.173,-0.382L0.38,-0.382L0.38,-0.688L0.498,-0.688L0.498,0L0.38,0Z" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(260.4,0,0,280,327.324,289.686)">
<path d="M0.488,-0.47C0.488,-0.441 0.484,-0.412 0.476,-0.385C0.468,-0.357 0.455,-0.333 0.439,-0.312C0.422,-0.29 0.4,-0.274 0.374,-0.261C0.348,-0.248 0.318,-0.242 0.282,-0.242L0.173,-0.242L0.173,0L0.055,0L0.055,-0.688L0.277,-0.688C0.314,-0.688 0.345,-0.683 0.371,-0.672C0.398,-0.662 0.419,-0.647 0.437,-0.627C0.454,-0.608 0.467,-0.585 0.476,-0.559C0.484,-0.532 0.488,-0.502 0.488,-0.47ZM0.369,-0.468C0.369,-0.503 0.36,-0.53 0.343,-0.549C0.326,-0.567 0.299,-0.576 0.264,-0.576L0.173,-0.576L0.173,-0.353L0.268,-0.353C0.285,-0.353 0.3,-0.356 0.313,-0.361C0.326,-0.367 0.336,-0.375 0.345,-0.385C0.353,-0.395 0.359,-0.407 0.363,-0.421C0.367,-0.435 0.369,-0.451 0.369,-0.468Z" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
</g>
<g>
<g transform="matrix(260.4,0,0,280,640.738,289.686)">
<path d="M0.453,0L0.352,-0.161L0.128,-0.161L0.128,0L0.021,0L0.021,-0.688L0.128,-0.688L0.57,0L0.453,0ZM0.282,-0.27L0.128,-0.515L0.128,-0.27L0.282,-0.27Z" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(260.4,0,0,280,787.905,289.686)">
<rect x="0.055" y="-0.688" width="0.119" height="0.688" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(260.4,0,0,280,816.346,289.686)">
<path d="M0.124,0L0.124,-0.688L0.242,-0.688L0.242,-0.111L0.499,-0.111L0.499,0L0.124,0Z" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(260.4,0,0,280,936.864,289.686)">
<path d="M0.089,0L0.089,-0.688L0.483,-0.688L0.483,-0.577L0.207,-0.577L0.207,-0.382L0.459,-0.382L0.459,-0.271L0.207,-0.271L0.207,-0.111L0.499,-0.111L0.499,0L0.089,0Z" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(233.533,0,0,280,1069.8,289.686)">
<path d="M0.442,0L0.312,-0.261L0.173,-0.261L0.173,0L0.055,0L0.055,-0.688L0.336,-0.688C0.372,-0.688 0.402,-0.683 0.429,-0.674C0.455,-0.664 0.477,-0.65 0.495,-0.633C0.512,-0.615 0.525,-0.593 0.534,-0.568C0.543,-0.543 0.547,-0.514 0.547,-0.483C0.547,-0.457 0.544,-0.434 0.538,-0.412C0.531,-0.391 0.523,-0.372 0.512,-0.355C0.501,-0.339 0.487,-0.325 0.472,-0.314C0.457,-0.302 0.44,-0.294 0.422,-0.289L0.575,0L0.442,0ZM0.428,-0.477C0.428,-0.511 0.419,-0.535 0.401,-0.552C0.383,-0.568 0.357,-0.576 0.324,-0.576L0.173,-0.576L0.173,-0.373L0.327,-0.373C0.345,-0.373 0.36,-0.376 0.373,-0.381C0.385,-0.386 0.396,-0.393 0.404,-0.402C0.412,-0.411 0.418,-0.422 0.422,-0.435C0.426,-0.448 0.428,-0.462 0.428,-0.477Z" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
</g>
</g>
<g transform="matrix(1,0,0,1,73.8296,353)">
<g transform="matrix(41,0,0,41,0,29.709)">
<path d="M0.352,-0.612L0.352,0L0.259,0L0.259,-0.612L0.022,-0.612L0.022,-0.688L0.588,-0.688L0.588,-0.612L0.352,-0.612Z" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(41,0,0,41,25.0444,29.709)">
<path d="M0.155,-0.438C0.165,-0.456 0.175,-0.471 0.187,-0.484C0.198,-0.496 0.21,-0.507 0.224,-0.515C0.238,-0.523 0.253,-0.529 0.269,-0.532C0.285,-0.536 0.304,-0.538 0.324,-0.538C0.358,-0.538 0.385,-0.534 0.407,-0.524C0.429,-0.515 0.446,-0.503 0.458,-0.486C0.471,-0.47 0.479,-0.45 0.484,-0.427C0.489,-0.404 0.491,-0.379 0.491,-0.352L0.491,0L0.403,0L0.403,-0.335C0.403,-0.357 0.401,-0.377 0.399,-0.394C0.396,-0.411 0.391,-0.425 0.383,-0.436C0.375,-0.448 0.364,-0.456 0.35,-0.462C0.335,-0.467 0.317,-0.47 0.294,-0.47C0.273,-0.47 0.254,-0.466 0.238,-0.459C0.221,-0.451 0.206,-0.441 0.195,-0.427C0.183,-0.414 0.174,-0.397 0.167,-0.377C0.16,-0.358 0.157,-0.336 0.157,-0.312L0.157,0L0.069,0L0.069,-0.725L0.157,-0.725L0.157,-0.536C0.157,-0.525 0.157,-0.515 0.157,-0.504C0.156,-0.493 0.156,-0.483 0.156,-0.474C0.155,-0.465 0.155,-0.457 0.154,-0.451C0.154,-0.445 0.154,-0.44 0.153,-0.438L0.155,-0.438Z" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(41,0,0,41,47.8467,29.709)">
<path d="M0.135,-0.246C0.135,-0.218 0.138,-0.192 0.143,-0.169C0.149,-0.146 0.158,-0.126 0.17,-0.109C0.182,-0.092 0.197,-0.079 0.215,-0.07C0.234,-0.061 0.256,-0.056 0.282,-0.056C0.32,-0.056 0.351,-0.064 0.374,-0.079C0.397,-0.094 0.412,-0.114 0.42,-0.137L0.498,-0.115C0.492,-0.101 0.484,-0.086 0.474,-0.071C0.464,-0.056 0.451,-0.043 0.435,-0.031C0.418,-0.019 0.397,-0.009 0.372,-0.002C0.347,0.006 0.317,0.01 0.282,0.01C0.204,0.01 0.145,-0.014 0.104,-0.06C0.063,-0.107 0.042,-0.176 0.042,-0.268C0.042,-0.317 0.049,-0.359 0.061,-0.393C0.073,-0.428 0.09,-0.456 0.112,-0.477C0.133,-0.499 0.158,-0.514 0.187,-0.524C0.216,-0.533 0.246,-0.538 0.279,-0.538C0.323,-0.538 0.36,-0.531 0.39,-0.517C0.42,-0.502 0.444,-0.483 0.462,-0.457C0.48,-0.432 0.493,-0.402 0.5,-0.368C0.508,-0.334 0.512,-0.297 0.512,-0.257L0.512,-0.246L0.135,-0.246ZM0.421,-0.313C0.416,-0.369 0.402,-0.409 0.378,-0.435C0.355,-0.46 0.321,-0.473 0.277,-0.473C0.263,-0.473 0.247,-0.471 0.231,-0.466C0.215,-0.461 0.2,-0.453 0.187,-0.441C0.173,-0.429 0.161,-0.413 0.152,-0.392C0.142,-0.371 0.137,-0.345 0.136,-0.313L0.421,-0.313Z" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(41,0,0,41,82.04,29.709)">
<path d="M0.614,-0.481C0.614,-0.451 0.609,-0.423 0.599,-0.397C0.589,-0.371 0.575,-0.349 0.555,-0.33C0.535,-0.311 0.511,-0.296 0.481,-0.285C0.451,-0.274 0.417,-0.268 0.377,-0.268L0.175,-0.268L0.175,0L0.082,0L0.082,-0.688L0.372,-0.688C0.412,-0.688 0.448,-0.683 0.478,-0.673C0.508,-0.663 0.534,-0.649 0.554,-0.631C0.574,-0.613 0.589,-0.591 0.599,-0.566C0.609,-0.54 0.614,-0.512 0.614,-0.481ZM0.521,-0.48C0.521,-0.524 0.507,-0.557 0.48,-0.579C0.454,-0.602 0.414,-0.613 0.36,-0.613L0.175,-0.613L0.175,-0.342L0.364,-0.342C0.418,-0.342 0.457,-0.354 0.483,-0.377C0.508,-0.401 0.521,-0.435 0.521,-0.48Z" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(41,0,0,41,109.387,29.709)">
<path d="M0.547,0L0.547,-0.319L0.175,-0.319L0.175,0L0.082,0L0.082,-0.688L0.175,-0.688L0.175,-0.397L0.547,-0.397L0.547,-0.688L0.641,-0.688L0.641,0L0.547,0Z" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(41,0,0,41,138.996,29.709)">
<path d="M0.614,-0.481C0.614,-0.451 0.609,-0.423 0.599,-0.397C0.589,-0.371 0.575,-0.349 0.555,-0.33C0.535,-0.311 0.511,-0.296 0.481,-0.285C0.451,-0.274 0.417,-0.268 0.377,-0.268L0.175,-0.268L0.175,0L0.082,0L0.082,-0.688L0.372,-0.688C0.412,-0.688 0.448,-0.683 0.478,-0.673C0.508,-0.663 0.534,-0.649 0.554,-0.631C0.574,-0.613 0.589,-0.591 0.599,-0.566C0.609,-0.54 0.614,-0.512 0.614,-0.481ZM0.521,-0.48C0.521,-0.524 0.507,-0.557 0.48,-0.579C0.454,-0.602 0.414,-0.613 0.36,-0.613L0.175,-0.613L0.175,-0.342L0.364,-0.342C0.418,-0.342 0.457,-0.354 0.483,-0.377C0.508,-0.401 0.521,-0.435 0.521,-0.48Z" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(41,0,0,41,176.993,29.709)">
<path d="M0.135,-0.246C0.135,-0.218 0.138,-0.192 0.143,-0.169C0.149,-0.146 0.158,-0.126 0.17,-0.109C0.182,-0.092 0.197,-0.079 0.215,-0.07C0.234,-0.061 0.256,-0.056 0.282,-0.056C0.32,-0.056 0.351,-0.064 0.374,-0.079C0.397,-0.094 0.412,-0.114 0.42,-0.137L0.498,-0.115C0.492,-0.101 0.484,-0.086 0.474,-0.071C0.464,-0.056 0.451,-0.043 0.435,-0.031C0.418,-0.019 0.397,-0.009 0.372,-0.002C0.347,0.006 0.317,0.01 0.282,0.01C0.204,0.01 0.145,-0.014 0.104,-0.06C0.063,-0.107 0.042,-0.176 0.042,-0.268C0.042,-0.317 0.049,-0.359 0.061,-0.393C0.073,-0.428 0.09,-0.456 0.112,-0.477C0.133,-0.499 0.158,-0.514 0.187,-0.524C0.216,-0.533 0.246,-0.538 0.279,-0.538C0.323,-0.538 0.36,-0.531 0.39,-0.517C0.42,-0.502 0.444,-0.483 0.462,-0.457C0.48,-0.432 0.493,-0.402 0.5,-0.368C0.508,-0.334 0.512,-0.297 0.512,-0.257L0.512,-0.246L0.135,-0.246ZM0.421,-0.313C0.416,-0.369 0.402,-0.409 0.378,-0.435C0.355,-0.46 0.321,-0.473 0.277,-0.473C0.263,-0.473 0.247,-0.471 0.231,-0.466C0.215,-0.461 0.2,-0.453 0.187,-0.441C0.173,-0.429 0.161,-0.413 0.152,-0.392C0.142,-0.371 0.137,-0.345 0.136,-0.313L0.421,-0.313Z" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(41,0,0,41,199.795,29.709)">
<path d="M0.375,0L0.375,-0.335C0.375,-0.361 0.373,-0.382 0.37,-0.399C0.367,-0.417 0.361,-0.431 0.354,-0.441C0.346,-0.452 0.336,-0.459 0.324,-0.464C0.311,-0.468 0.296,-0.47 0.278,-0.47C0.26,-0.47 0.243,-0.467 0.228,-0.459C0.213,-0.452 0.2,-0.441 0.19,-0.427C0.179,-0.414 0.171,-0.397 0.165,-0.376C0.16,-0.356 0.157,-0.333 0.157,-0.306L0.157,0L0.069,0L0.069,-0.416C0.069,-0.427 0.069,-0.438 0.069,-0.45C0.069,-0.463 0.069,-0.474 0.068,-0.485C0.068,-0.496 0.068,-0.505 0.067,-0.513C0.067,-0.521 0.067,-0.526 0.066,-0.528L0.149,-0.528C0.15,-0.527 0.15,-0.522 0.15,-0.515C0.151,-0.508 0.151,-0.5 0.152,-0.49C0.152,-0.481 0.153,-0.472 0.153,-0.462C0.153,-0.453 0.153,-0.444 0.153,-0.438L0.155,-0.438C0.163,-0.453 0.171,-0.467 0.18,-0.479C0.189,-0.492 0.2,-0.502 0.212,-0.511C0.224,-0.52 0.238,-0.526 0.254,-0.531C0.27,-0.536 0.288,-0.538 0.309,-0.538C0.349,-0.538 0.381,-0.53 0.404,-0.514C0.427,-0.498 0.444,-0.473 0.453,-0.438L0.454,-0.438C0.462,-0.453 0.471,-0.467 0.48,-0.479C0.49,-0.492 0.502,-0.502 0.515,-0.511C0.528,-0.52 0.542,-0.526 0.559,-0.531C0.575,-0.536 0.593,-0.538 0.614,-0.538C0.641,-0.538 0.664,-0.535 0.683,-0.527C0.703,-0.52 0.719,-0.509 0.731,-0.494C0.743,-0.479 0.752,-0.46 0.758,-0.436C0.764,-0.413 0.767,-0.385 0.767,-0.352L0.767,0L0.68,0L0.68,-0.335C0.68,-0.361 0.679,-0.382 0.675,-0.399C0.672,-0.417 0.667,-0.431 0.659,-0.441C0.651,-0.452 0.641,-0.459 0.629,-0.464C0.617,-0.468 0.601,-0.47 0.583,-0.47C0.565,-0.47 0.548,-0.467 0.533,-0.46C0.518,-0.453 0.505,-0.442 0.495,-0.429C0.484,-0.415 0.476,-0.398 0.47,-0.377C0.465,-0.357 0.462,-0.333 0.462,-0.306L0.462,0L0.375,0Z" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(41,0,0,41,233.948,29.709)">
<path d="M0.202,0.01C0.149,0.01 0.109,-0.004 0.083,-0.032C0.056,-0.06 0.042,-0.099 0.042,-0.147C0.042,-0.182 0.049,-0.211 0.062,-0.233C0.075,-0.255 0.093,-0.273 0.114,-0.286C0.135,-0.298 0.16,-0.307 0.187,-0.312C0.214,-0.317 0.242,-0.32 0.271,-0.32L0.389,-0.322L0.389,-0.351C0.389,-0.373 0.387,-0.391 0.382,-0.407C0.378,-0.422 0.371,-0.434 0.361,-0.444C0.352,-0.453 0.34,-0.46 0.326,-0.465C0.312,-0.469 0.295,-0.471 0.276,-0.471C0.259,-0.471 0.244,-0.47 0.23,-0.468C0.216,-0.465 0.204,-0.461 0.194,-0.454C0.184,-0.448 0.176,-0.439 0.17,-0.428C0.164,-0.418 0.16,-0.404 0.158,-0.387L0.066,-0.396C0.069,-0.416 0.075,-0.435 0.084,-0.453C0.094,-0.47 0.107,-0.485 0.123,-0.498C0.14,-0.511 0.161,-0.521 0.186,-0.528C0.212,-0.535 0.242,-0.538 0.278,-0.538C0.344,-0.538 0.394,-0.523 0.428,-0.492C0.461,-0.462 0.478,-0.418 0.478,-0.36L0.478,-0.133C0.478,-0.107 0.481,-0.087 0.488,-0.074C0.495,-0.061 0.508,-0.054 0.527,-0.054C0.532,-0.054 0.537,-0.055 0.542,-0.055C0.547,-0.056 0.552,-0.057 0.556,-0.058L0.556,-0.003C0.545,0 0.534,0.002 0.523,0.003C0.512,0.004 0.501,0.005 0.488,0.005C0.472,0.005 0.457,0.003 0.446,-0.002C0.434,-0.006 0.424,-0.013 0.417,-0.022C0.409,-0.031 0.403,-0.042 0.399,-0.055C0.396,-0.068 0.393,-0.083 0.392,-0.101L0.389,-0.101C0.38,-0.084 0.369,-0.069 0.358,-0.055C0.347,-0.042 0.334,-0.03 0.319,-0.02C0.304,-0.011 0.287,-0.003 0.268,0.002C0.249,0.007 0.227,0.01 0.202,0.01ZM0.222,-0.056C0.25,-0.056 0.275,-0.061 0.296,-0.072C0.317,-0.082 0.334,-0.095 0.348,-0.111C0.362,-0.127 0.372,-0.144 0.379,-0.163C0.386,-0.182 0.389,-0.2 0.389,-0.217L0.389,-0.261L0.293,-0.259C0.271,-0.258 0.251,-0.257 0.232,-0.254C0.212,-0.251 0.195,-0.246 0.181,-0.238C0.166,-0.23 0.154,-0.218 0.146,-0.204C0.137,-0.189 0.133,-0.17 0.133,-0.146C0.133,-0.117 0.141,-0.095 0.156,-0.08C0.171,-0.064 0.194,-0.056 0.222,-0.056Z" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(41,0,0,41,256.75,29.709)">
<path d="M0.067,-0.641L0.067,-0.725L0.155,-0.725L0.155,-0.641L0.067,-0.641ZM0.067,0L0.067,-0.528L0.155,-0.528L0.155,0L0.067,0Z" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(41,0,0,41,265.859,29.709)">
<rect x="0.067" y="-0.725" width="0.088" height="0.725" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(41,0,0,41,286.359,29.709)">
<path d="M0.134,-0.267C0.134,-0.236 0.136,-0.208 0.141,-0.183C0.145,-0.158 0.153,-0.136 0.163,-0.117C0.174,-0.099 0.187,-0.085 0.204,-0.075C0.221,-0.065 0.243,-0.06 0.268,-0.06C0.299,-0.06 0.325,-0.068 0.346,-0.085C0.367,-0.102 0.38,-0.128 0.385,-0.163L0.474,-0.157C0.471,-0.135 0.464,-0.114 0.455,-0.094C0.445,-0.074 0.432,-0.056 0.415,-0.041C0.398,-0.026 0.378,-0.013 0.354,-0.004C0.329,0.005 0.302,0.01 0.27,0.01C0.229,0.01 0.194,0.003 0.165,-0.011C0.136,-0.025 0.112,-0.045 0.094,-0.069C0.076,-0.094 0.063,-0.123 0.055,-0.156C0.047,-0.189 0.042,-0.226 0.042,-0.265C0.042,-0.3 0.045,-0.331 0.051,-0.359C0.057,-0.386 0.065,-0.41 0.076,-0.43C0.087,-0.45 0.099,-0.467 0.113,-0.481C0.128,-0.495 0.143,-0.506 0.16,-0.514C0.177,-0.523 0.194,-0.529 0.213,-0.532C0.231,-0.536 0.25,-0.538 0.269,-0.538C0.299,-0.538 0.325,-0.534 0.348,-0.526C0.371,-0.518 0.391,-0.507 0.408,-0.492C0.425,-0.478 0.438,-0.462 0.449,-0.442C0.459,-0.423 0.466,-0.403 0.471,-0.38L0.38,-0.374C0.376,-0.403 0.364,-0.426 0.346,-0.443C0.327,-0.461 0.301,-0.469 0.267,-0.469C0.242,-0.469 0.221,-0.465 0.204,-0.457C0.187,-0.448 0.174,-0.436 0.163,-0.419C0.153,-0.402 0.145,-0.381 0.141,-0.356C0.136,-0.331 0.134,-0.301 0.134,-0.267Z" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(41,0,0,41,306.859,29.709)">
<rect x="0.067" y="-0.725" width="0.088" height="0.725" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(41,0,0,41,315.968,29.709)">
<path d="M0.202,0.01C0.149,0.01 0.109,-0.004 0.083,-0.032C0.056,-0.06 0.042,-0.099 0.042,-0.147C0.042,-0.182 0.049,-0.211 0.062,-0.233C0.075,-0.255 0.093,-0.273 0.114,-0.286C0.135,-0.298 0.16,-0.307 0.187,-0.312C0.214,-0.317 0.242,-0.32 0.271,-0.32L0.389,-0.322L0.389,-0.351C0.389,-0.373 0.387,-0.391 0.382,-0.407C0.378,-0.422 0.371,-0.434 0.361,-0.444C0.352,-0.453 0.34,-0.46 0.326,-0.465C0.312,-0.469 0.295,-0.471 0.276,-0.471C0.259,-0.471 0.244,-0.47 0.23,-0.468C0.216,-0.465 0.204,-0.461 0.194,-0.454C0.184,-0.448 0.176,-0.439 0.17,-0.428C0.164,-0.418 0.16,-0.404 0.158,-0.387L0.066,-0.396C0.069,-0.416 0.075,-0.435 0.084,-0.453C0.094,-0.47 0.107,-0.485 0.123,-0.498C0.14,-0.511 0.161,-0.521 0.186,-0.528C0.212,-0.535 0.242,-0.538 0.278,-0.538C0.344,-0.538 0.394,-0.523 0.428,-0.492C0.461,-0.462 0.478,-0.418 0.478,-0.36L0.478,-0.133C0.478,-0.107 0.481,-0.087 0.488,-0.074C0.495,-0.061 0.508,-0.054 0.527,-0.054C0.532,-0.054 0.537,-0.055 0.542,-0.055C0.547,-0.056 0.552,-0.057 0.556,-0.058L0.556,-0.003C0.545,0 0.534,0.002 0.523,0.003C0.512,0.004 0.501,0.005 0.488,0.005C0.472,0.005 0.457,0.003 0.446,-0.002C0.434,-0.006 0.424,-0.013 0.417,-0.022C0.409,-0.031 0.403,-0.042 0.399,-0.055C0.396,-0.068 0.393,-0.083 0.392,-0.101L0.389,-0.101C0.38,-0.084 0.369,-0.069 0.358,-0.055C0.347,-0.042 0.334,-0.03 0.319,-0.02C0.304,-0.011 0.287,-0.003 0.268,0.002C0.249,0.007 0.227,0.01 0.202,0.01ZM0.222,-0.056C0.25,-0.056 0.275,-0.061 0.296,-0.072C0.317,-0.082 0.334,-0.095 0.348,-0.111C0.362,-0.127 0.372,-0.144 0.379,-0.163C0.386,-0.182 0.389,-0.2 0.389,-0.217L0.389,-0.261L0.293,-0.259C0.271,-0.258 0.251,-0.257 0.232,-0.254C0.212,-0.251 0.195,-0.246 0.181,-0.238C0.166,-0.23 0.154,-0.218 0.146,-0.204C0.137,-0.189 0.133,-0.17 0.133,-0.146C0.133,-0.117 0.141,-0.095 0.156,-0.08C0.171,-0.064 0.194,-0.056 0.222,-0.056Z" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(41,0,0,41,338.771,29.709)">
<path d="M0.464,-0.146C0.464,-0.121 0.459,-0.099 0.449,-0.08C0.44,-0.06 0.426,-0.044 0.408,-0.031C0.389,-0.018 0.367,-0.008 0.341,-0.001C0.314,0.006 0.284,0.01 0.25,0.01C0.219,0.01 0.191,0.007 0.167,0.003C0.142,-0.002 0.121,-0.01 0.102,-0.02C0.083,-0.03 0.068,-0.044 0.055,-0.061C0.043,-0.078 0.034,-0.099 0.028,-0.124L0.105,-0.139C0.113,-0.111 0.128,-0.09 0.152,-0.077C0.175,-0.064 0.208,-0.057 0.25,-0.057C0.268,-0.057 0.286,-0.058 0.302,-0.061C0.317,-0.064 0.331,-0.068 0.342,-0.074C0.354,-0.081 0.363,-0.089 0.369,-0.1C0.375,-0.11 0.378,-0.124 0.378,-0.139C0.378,-0.155 0.375,-0.168 0.367,-0.178C0.36,-0.189 0.349,-0.197 0.336,-0.204C0.323,-0.211 0.306,-0.217 0.287,-0.222C0.268,-0.227 0.247,-0.233 0.225,-0.239C0.203,-0.244 0.182,-0.25 0.162,-0.257C0.141,-0.264 0.122,-0.273 0.105,-0.284C0.088,-0.296 0.075,-0.31 0.064,-0.326C0.054,-0.343 0.049,-0.364 0.049,-0.389C0.049,-0.437 0.066,-0.474 0.1,-0.499C0.135,-0.524 0.185,-0.537 0.25,-0.537C0.309,-0.537 0.355,-0.526 0.389,-0.506C0.424,-0.485 0.445,-0.452 0.455,-0.407L0.375,-0.397C0.373,-0.411 0.367,-0.423 0.359,-0.432C0.352,-0.441 0.342,-0.449 0.331,-0.454C0.32,-0.46 0.308,-0.464 0.294,-0.467C0.28,-0.469 0.265,-0.47 0.25,-0.47C0.211,-0.47 0.181,-0.464 0.163,-0.452C0.144,-0.44 0.134,-0.422 0.134,-0.397C0.134,-0.383 0.138,-0.371 0.145,-0.362C0.152,-0.353 0.162,-0.345 0.174,-0.339C0.187,-0.332 0.202,-0.327 0.219,-0.322C0.237,-0.317 0.256,-0.312 0.277,-0.307C0.291,-0.304 0.306,-0.3 0.32,-0.296C0.335,-0.292 0.349,-0.287 0.363,-0.281C0.377,-0.275 0.39,-0.269 0.402,-0.261C0.414,-0.253 0.425,-0.244 0.434,-0.233C0.443,-0.223 0.45,-0.21 0.456,-0.196C0.461,-0.181 0.464,-0.165 0.464,-0.146Z" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(41,0,0,41,359.271,29.709)">
<path d="M0.464,-0.146C0.464,-0.121 0.459,-0.099 0.449,-0.08C0.44,-0.06 0.426,-0.044 0.408,-0.031C0.389,-0.018 0.367,-0.008 0.341,-0.001C0.314,0.006 0.284,0.01 0.25,0.01C0.219,0.01 0.191,0.007 0.167,0.003C0.142,-0.002 0.121,-0.01 0.102,-0.02C0.083,-0.03 0.068,-0.044 0.055,-0.061C0.043,-0.078 0.034,-0.099 0.028,-0.124L0.105,-0.139C0.113,-0.111 0.128,-0.09 0.152,-0.077C0.175,-0.064 0.208,-0.057 0.25,-0.057C0.268,-0.057 0.286,-0.058 0.302,-0.061C0.317,-0.064 0.331,-0.068 0.342,-0.074C0.354,-0.081 0.363,-0.089 0.369,-0.1C0.375,-0.11 0.378,-0.124 0.378,-0.139C0.378,-0.155 0.375,-0.168 0.367,-0.178C0.36,-0.189 0.349,-0.197 0.336,-0.204C0.323,-0.211 0.306,-0.217 0.287,-0.222C0.268,-0.227 0.247,-0.233 0.225,-0.239C0.203,-0.244 0.182,-0.25 0.162,-0.257C0.141,-0.264 0.122,-0.273 0.105,-0.284C0.088,-0.296 0.075,-0.31 0.064,-0.326C0.054,-0.343 0.049,-0.364 0.049,-0.389C0.049,-0.437 0.066,-0.474 0.1,-0.499C0.135,-0.524 0.185,-0.537 0.25,-0.537C0.309,-0.537 0.355,-0.526 0.389,-0.506C0.424,-0.485 0.445,-0.452 0.455,-0.407L0.375,-0.397C0.373,-0.411 0.367,-0.423 0.359,-0.432C0.352,-0.441 0.342,-0.449 0.331,-0.454C0.32,-0.46 0.308,-0.464 0.294,-0.467C0.28,-0.469 0.265,-0.47 0.25,-0.47C0.211,-0.47 0.181,-0.464 0.163,-0.452C0.144,-0.44 0.134,-0.422 0.134,-0.397C0.134,-0.383 0.138,-0.371 0.145,-0.362C0.152,-0.353 0.162,-0.345 0.174,-0.339C0.187,-0.332 0.202,-0.327 0.219,-0.322C0.237,-0.317 0.256,-0.312 0.277,-0.307C0.291,-0.304 0.306,-0.3 0.32,-0.296C0.335,-0.292 0.349,-0.287 0.363,-0.281C0.377,-0.275 0.39,-0.269 0.402,-0.261C0.414,-0.253 0.425,-0.244 0.434,-0.233C0.443,-0.223 0.45,-0.21 0.456,-0.196C0.461,-0.181 0.464,-0.165 0.464,-0.146Z" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(41,0,0,41,391.162,29.709)">
<path d="M0.155,-0.438C0.165,-0.456 0.175,-0.471 0.187,-0.484C0.198,-0.496 0.21,-0.507 0.224,-0.515C0.238,-0.523 0.253,-0.529 0.269,-0.532C0.285,-0.536 0.304,-0.538 0.324,-0.538C0.358,-0.538 0.385,-0.534 0.407,-0.524C0.429,-0.515 0.446,-0.503 0.458,-0.486C0.471,-0.47 0.479,-0.45 0.484,-0.427C0.489,-0.404 0.491,-0.379 0.491,-0.352L0.491,0L0.403,0L0.403,-0.335C0.403,-0.357 0.401,-0.377 0.399,-0.394C0.396,-0.411 0.391,-0.425 0.383,-0.436C0.375,-0.448 0.364,-0.456 0.35,-0.462C0.335,-0.467 0.317,-0.47 0.294,-0.47C0.273,-0.47 0.254,-0.466 0.238,-0.459C0.221,-0.451 0.206,-0.441 0.195,-0.427C0.183,-0.414 0.174,-0.397 0.167,-0.377C0.16,-0.358 0.157,-0.336 0.157,-0.312L0.157,0L0.069,0L0.069,-0.725L0.157,-0.725L0.157,-0.536C0.157,-0.525 0.157,-0.515 0.157,-0.504C0.156,-0.493 0.156,-0.483 0.156,-0.474C0.155,-0.465 0.155,-0.457 0.154,-0.451C0.154,-0.445 0.154,-0.44 0.153,-0.438L0.155,-0.438Z" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(41,0,0,41,413.964,29.709)">
<path d="M0.271,-0.004C0.257,0 0.244,0.003 0.23,0.005C0.216,0.007 0.2,0.008 0.182,0.008C0.111,0.008 0.076,-0.032 0.076,-0.112L0.076,-0.464L0.015,-0.464L0.015,-0.528L0.08,-0.528L0.105,-0.646L0.164,-0.646L0.164,-0.528L0.262,-0.528L0.262,-0.464L0.164,-0.464L0.164,-0.131C0.164,-0.105 0.168,-0.088 0.177,-0.077C0.185,-0.067 0.199,-0.062 0.22,-0.062C0.228,-0.062 0.236,-0.063 0.244,-0.064C0.252,-0.065 0.261,-0.067 0.271,-0.069L0.271,-0.004Z" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(41,0,0,41,425.355,29.709)">
<path d="M0.271,-0.004C0.257,0 0.244,0.003 0.23,0.005C0.216,0.007 0.2,0.008 0.182,0.008C0.111,0.008 0.076,-0.032 0.076,-0.112L0.076,-0.464L0.015,-0.464L0.015,-0.528L0.08,-0.528L0.105,-0.646L0.164,-0.646L0.164,-0.528L0.262,-0.528L0.262,-0.464L0.164,-0.464L0.164,-0.131C0.164,-0.105 0.168,-0.088 0.177,-0.077C0.185,-0.067 0.199,-0.062 0.22,-0.062C0.228,-0.062 0.236,-0.063 0.244,-0.064C0.252,-0.065 0.261,-0.067 0.271,-0.069L0.271,-0.004Z" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(41,0,0,41,436.746,29.709)">
<path d="M0.514,-0.267C0.514,-0.227 0.511,-0.19 0.504,-0.156C0.498,-0.122 0.487,-0.093 0.472,-0.068C0.457,-0.044 0.437,-0.025 0.412,-0.011C0.387,0.003 0.356,0.01 0.32,0.01C0.282,0.01 0.249,0.003 0.221,-0.012C0.192,-0.026 0.171,-0.049 0.156,-0.082L0.153,-0.082C0.154,-0.081 0.154,-0.078 0.154,-0.073C0.154,-0.068 0.154,-0.062 0.155,-0.054C0.155,-0.046 0.155,-0.037 0.155,-0.028C0.155,-0.018 0.155,-0.008 0.155,0.001L0.155,0.208L0.067,0.208L0.067,-0.42C0.067,-0.433 0.067,-0.445 0.067,-0.457C0.067,-0.469 0.067,-0.479 0.066,-0.489C0.066,-0.499 0.066,-0.507 0.065,-0.514C0.065,-0.521 0.065,-0.525 0.064,-0.528L0.149,-0.528C0.15,-0.527 0.15,-0.524 0.151,-0.518C0.151,-0.512 0.152,-0.505 0.152,-0.497C0.153,-0.489 0.153,-0.48 0.154,-0.47C0.154,-0.461 0.154,-0.452 0.154,-0.443L0.156,-0.443C0.164,-0.46 0.174,-0.475 0.184,-0.487C0.194,-0.498 0.206,-0.508 0.22,-0.516C0.233,-0.524 0.248,-0.529 0.264,-0.532C0.281,-0.536 0.299,-0.538 0.32,-0.538C0.356,-0.538 0.387,-0.531 0.412,-0.518C0.437,-0.505 0.457,-0.487 0.472,-0.463C0.487,-0.44 0.498,-0.411 0.504,-0.378C0.511,-0.344 0.514,-0.307 0.514,-0.267ZM0.422,-0.265C0.422,-0.297 0.42,-0.326 0.416,-0.352C0.412,-0.377 0.405,-0.398 0.396,-0.416C0.386,-0.434 0.373,-0.447 0.357,-0.456C0.341,-0.465 0.321,-0.47 0.297,-0.47C0.278,-0.47 0.259,-0.467 0.242,-0.461C0.225,-0.456 0.21,-0.445 0.197,-0.43C0.184,-0.414 0.174,-0.392 0.167,-0.365C0.159,-0.337 0.155,-0.302 0.155,-0.258C0.155,-0.22 0.158,-0.189 0.165,-0.163C0.171,-0.137 0.18,-0.116 0.192,-0.1C0.204,-0.084 0.218,-0.073 0.236,-0.066C0.253,-0.059 0.274,-0.055 0.296,-0.055C0.321,-0.055 0.341,-0.06 0.357,-0.069C0.373,-0.079 0.386,-0.092 0.396,-0.11C0.405,-0.128 0.412,-0.15 0.416,-0.176C0.42,-0.202 0.422,-0.231 0.422,-0.265Z" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(41,0,0,41,459.548,29.709)">
<path d="M0.464,-0.146C0.464,-0.121 0.459,-0.099 0.449,-0.08C0.44,-0.06 0.426,-0.044 0.408,-0.031C0.389,-0.018 0.367,-0.008 0.341,-0.001C0.314,0.006 0.284,0.01 0.25,0.01C0.219,0.01 0.191,0.007 0.167,0.003C0.142,-0.002 0.121,-0.01 0.102,-0.02C0.083,-0.03 0.068,-0.044 0.055,-0.061C0.043,-0.078 0.034,-0.099 0.028,-0.124L0.105,-0.139C0.113,-0.111 0.128,-0.09 0.152,-0.077C0.175,-0.064 0.208,-0.057 0.25,-0.057C0.268,-0.057 0.286,-0.058 0.302,-0.061C0.317,-0.064 0.331,-0.068 0.342,-0.074C0.354,-0.081 0.363,-0.089 0.369,-0.1C0.375,-0.11 0.378,-0.124 0.378,-0.139C0.378,-0.155 0.375,-0.168 0.367,-0.178C0.36,-0.189 0.349,-0.197 0.336,-0.204C0.323,-0.211 0.306,-0.217 0.287,-0.222C0.268,-0.227 0.247,-0.233 0.225,-0.239C0.203,-0.244 0.182,-0.25 0.162,-0.257C0.141,-0.264 0.122,-0.273 0.105,-0.284C0.088,-0.296 0.075,-0.31 0.064,-0.326C0.054,-0.343 0.049,-0.364 0.049,-0.389C0.049,-0.437 0.066,-0.474 0.1,-0.499C0.135,-0.524 0.185,-0.537 0.25,-0.537C0.309,-0.537 0.355,-0.526 0.389,-0.506C0.424,-0.485 0.445,-0.452 0.455,-0.407L0.375,-0.397C0.373,-0.411 0.367,-0.423 0.359,-0.432C0.352,-0.441 0.342,-0.449 0.331,-0.454C0.32,-0.46 0.308,-0.464 0.294,-0.467C0.28,-0.469 0.265,-0.47 0.25,-0.47C0.211,-0.47 0.181,-0.464 0.163,-0.452C0.144,-0.44 0.134,-0.422 0.134,-0.397C0.134,-0.383 0.138,-0.371 0.145,-0.362C0.152,-0.353 0.162,-0.345 0.174,-0.339C0.187,-0.332 0.202,-0.327 0.219,-0.322C0.237,-0.317 0.256,-0.312 0.277,-0.307C0.291,-0.304 0.306,-0.3 0.32,-0.296C0.335,-0.292 0.349,-0.287 0.363,-0.281C0.377,-0.275 0.39,-0.269 0.402,-0.261C0.414,-0.253 0.425,-0.244 0.434,-0.233C0.443,-0.223 0.45,-0.21 0.456,-0.196C0.461,-0.181 0.464,-0.165 0.464,-0.146Z" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(41,0,0,41,480.048,29.709)">
<path d="M0.091,-0.427L0.091,-0.528L0.187,-0.528L0.187,-0.427L0.091,-0.427ZM0.091,0L0.091,-0.101L0.187,-0.101L0.187,0L0.091,0Z" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(41,0,0,41,491.439,29.709)">
<path d="M0,0.01L0.201,-0.725L0.278,-0.725L0.079,0.01L0,0.01Z" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(41,0,0,41,502.831,29.709)">
<path d="M0,0.01L0.201,-0.725L0.278,-0.725L0.079,0.01L0,0.01Z" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(41,0,0,41,514.222,29.709)">
<path d="M0.268,0.208C0.237,0.208 0.21,0.204 0.187,0.198C0.164,0.192 0.144,0.183 0.127,0.172C0.11,0.16 0.097,0.146 0.086,0.13C0.076,0.114 0.069,0.097 0.064,0.077L0.152,0.064C0.158,0.089 0.171,0.108 0.191,0.121C0.211,0.134 0.237,0.141 0.27,0.141C0.29,0.141 0.308,0.138 0.324,0.132C0.34,0.127 0.354,0.118 0.366,0.106C0.377,0.094 0.386,0.078 0.392,0.058C0.398,0.039 0.401,0.015 0.401,-0.013L0.401,-0.098L0.4,-0.098C0.394,-0.085 0.386,-0.072 0.376,-0.06C0.367,-0.048 0.355,-0.037 0.341,-0.027C0.327,-0.018 0.311,-0.01 0.293,-0.005C0.275,0.001 0.254,0.004 0.23,0.004C0.197,0.004 0.168,-0.002 0.144,-0.013C0.12,-0.024 0.101,-0.041 0.086,-0.063C0.071,-0.086 0.059,-0.114 0.052,-0.147C0.045,-0.181 0.042,-0.219 0.042,-0.263C0.042,-0.306 0.045,-0.344 0.052,-0.377C0.059,-0.411 0.071,-0.44 0.087,-0.464C0.102,-0.487 0.123,-0.505 0.148,-0.518C0.173,-0.53 0.204,-0.537 0.24,-0.537C0.278,-0.537 0.31,-0.528 0.338,-0.511C0.365,-0.494 0.386,-0.47 0.401,-0.438L0.402,-0.438C0.402,-0.446 0.403,-0.455 0.403,-0.465C0.404,-0.475 0.404,-0.485 0.405,-0.494C0.405,-0.503 0.406,-0.511 0.406,-0.517C0.407,-0.524 0.408,-0.527 0.408,-0.528L0.492,-0.528C0.491,-0.525 0.491,-0.52 0.491,-0.513C0.49,-0.506 0.49,-0.498 0.49,-0.488C0.489,-0.479 0.489,-0.468 0.489,-0.456C0.489,-0.444 0.489,-0.432 0.489,-0.419L0.489,-0.015C0.489,0.059 0.471,0.114 0.434,0.152C0.398,0.189 0.342,0.208 0.268,0.208ZM0.401,-0.264C0.401,-0.301 0.397,-0.332 0.389,-0.359C0.381,-0.385 0.371,-0.406 0.358,-0.423C0.345,-0.439 0.33,-0.452 0.313,-0.459C0.296,-0.467 0.279,-0.471 0.262,-0.471C0.239,-0.471 0.22,-0.467 0.204,-0.459C0.188,-0.452 0.174,-0.439 0.164,-0.423C0.153,-0.406 0.145,-0.384 0.14,-0.358C0.135,-0.332 0.133,-0.301 0.133,-0.264C0.133,-0.226 0.135,-0.194 0.14,-0.168C0.145,-0.142 0.153,-0.121 0.164,-0.105C0.174,-0.09 0.187,-0.078 0.203,-0.071C0.219,-0.064 0.238,-0.061 0.26,-0.061C0.278,-0.061 0.295,-0.065 0.312,-0.072C0.329,-0.08 0.344,-0.092 0.357,-0.108C0.37,-0.124 0.381,-0.145 0.389,-0.171C0.397,-0.197 0.401,-0.228 0.401,-0.264Z" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(41,0,0,41,537.024,29.709)">
<path d="M0.067,-0.641L0.067,-0.725L0.155,-0.725L0.155,-0.641L0.067,-0.641ZM0.067,0L0.067,-0.528L0.155,-0.528L0.155,0L0.067,0Z" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(41,0,0,41,546.133,29.709)">
<path d="M0.271,-0.004C0.257,0 0.244,0.003 0.23,0.005C0.216,0.007 0.2,0.008 0.182,0.008C0.111,0.008 0.076,-0.032 0.076,-0.112L0.076,-0.464L0.015,-0.464L0.015,-0.528L0.08,-0.528L0.105,-0.646L0.164,-0.646L0.164,-0.528L0.262,-0.528L0.262,-0.464L0.164,-0.464L0.164,-0.131C0.164,-0.105 0.168,-0.088 0.177,-0.077C0.185,-0.067 0.199,-0.062 0.22,-0.062C0.228,-0.062 0.236,-0.063 0.244,-0.064C0.252,-0.065 0.261,-0.067 0.271,-0.069L0.271,-0.004Z" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(41,0,0,41,557.524,29.709)">
<path d="M0.155,-0.438C0.165,-0.456 0.175,-0.471 0.187,-0.484C0.198,-0.496 0.21,-0.507 0.224,-0.515C0.238,-0.523 0.253,-0.529 0.269,-0.532C0.285,-0.536 0.304,-0.538 0.324,-0.538C0.358,-0.538 0.385,-0.534 0.407,-0.524C0.429,-0.515 0.446,-0.503 0.458,-0.486C0.471,-0.47 0.479,-0.45 0.484,-0.427C0.489,-0.404 0.491,-0.379 0.491,-0.352L0.491,0L0.403,0L0.403,-0.335C0.403,-0.357 0.401,-0.377 0.399,-0.394C0.396,-0.411 0.391,-0.425 0.383,-0.436C0.375,-0.448 0.364,-0.456 0.35,-0.462C0.335,-0.467 0.317,-0.47 0.294,-0.47C0.273,-0.47 0.254,-0.466 0.238,-0.459C0.221,-0.451 0.206,-0.441 0.195,-0.427C0.183,-0.414 0.174,-0.397 0.167,-0.377C0.16,-0.358 0.157,-0.336 0.157,-0.312L0.157,0L0.069,0L0.069,-0.725L0.157,-0.725L0.157,-0.536C0.157,-0.525 0.157,-0.515 0.157,-0.504C0.156,-0.493 0.156,-0.483 0.156,-0.474C0.155,-0.465 0.155,-0.457 0.154,-0.451C0.154,-0.445 0.154,-0.44 0.153,-0.438L0.155,-0.438Z" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(41,0,0,41,580.326,29.709)">
<path d="M0.153,-0.528L0.153,-0.193C0.153,-0.168 0.155,-0.146 0.159,-0.129C0.163,-0.112 0.169,-0.098 0.177,-0.087C0.186,-0.077 0.197,-0.069 0.211,-0.065C0.225,-0.06 0.242,-0.058 0.262,-0.058C0.283,-0.058 0.302,-0.062 0.319,-0.069C0.335,-0.076 0.35,-0.087 0.362,-0.101C0.373,-0.115 0.383,-0.132 0.389,-0.152C0.396,-0.172 0.399,-0.196 0.399,-0.222L0.399,-0.528L0.487,-0.528L0.487,-0.113C0.487,-0.102 0.487,-0.09 0.487,-0.078C0.487,-0.066 0.487,-0.054 0.488,-0.043C0.488,-0.032 0.488,-0.023 0.489,-0.015C0.489,-0.007 0.489,-0.002 0.49,0L0.407,0C0.406,-0.002 0.406,-0.006 0.406,-0.013C0.405,-0.02 0.405,-0.029 0.405,-0.038C0.404,-0.047 0.404,-0.057 0.403,-0.066C0.403,-0.076 0.403,-0.084 0.403,-0.09L0.401,-0.09C0.393,-0.075 0.384,-0.061 0.374,-0.049C0.363,-0.036 0.352,-0.026 0.338,-0.017C0.325,-0.009 0.31,-0.002 0.292,0.003C0.275,0.007 0.255,0.01 0.232,0.01C0.203,0.01 0.178,0.006 0.157,-0.001C0.136,-0.008 0.118,-0.019 0.104,-0.034C0.091,-0.049 0.081,-0.068 0.074,-0.092C0.068,-0.115 0.065,-0.143 0.065,-0.176L0.065,-0.528L0.153,-0.528Z" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(41,0,0,41,603.128,29.709)">
<path d="M0.514,-0.267C0.514,-0.082 0.449,0.01 0.32,0.01C0.28,0.01 0.247,0.003 0.22,-0.012C0.193,-0.026 0.172,-0.05 0.155,-0.082L0.154,-0.082C0.154,-0.074 0.154,-0.065 0.154,-0.056C0.153,-0.047 0.153,-0.038 0.152,-0.03C0.152,-0.022 0.151,-0.016 0.151,-0.01C0.15,-0.005 0.15,-0.001 0.149,0L0.064,0C0.065,-0.003 0.065,-0.008 0.065,-0.015C0.066,-0.022 0.066,-0.03 0.066,-0.04C0.067,-0.05 0.067,-0.061 0.067,-0.072C0.067,-0.084 0.067,-0.096 0.067,-0.109L0.067,-0.725L0.155,-0.725L0.155,-0.518C0.155,-0.508 0.155,-0.499 0.155,-0.49C0.155,-0.481 0.155,-0.473 0.154,-0.466C0.154,-0.458 0.154,-0.451 0.153,-0.443L0.155,-0.443C0.172,-0.477 0.193,-0.501 0.22,-0.516C0.247,-0.531 0.28,-0.538 0.32,-0.538C0.387,-0.538 0.436,-0.516 0.467,-0.471C0.498,-0.426 0.514,-0.358 0.514,-0.267ZM0.422,-0.264C0.422,-0.3 0.42,-0.331 0.415,-0.357C0.41,-0.383 0.403,-0.405 0.393,-0.422C0.383,-0.438 0.37,-0.451 0.354,-0.458C0.339,-0.466 0.32,-0.47 0.297,-0.47C0.274,-0.47 0.254,-0.466 0.236,-0.459C0.218,-0.451 0.204,-0.439 0.192,-0.423C0.18,-0.406 0.171,-0.384 0.165,-0.357C0.158,-0.33 0.155,-0.297 0.155,-0.258C0.155,-0.221 0.158,-0.189 0.165,-0.163C0.171,-0.137 0.18,-0.116 0.192,-0.1C0.204,-0.084 0.218,-0.073 0.236,-0.066C0.253,-0.059 0.274,-0.055 0.296,-0.055C0.318,-0.055 0.336,-0.059 0.352,-0.066C0.368,-0.074 0.381,-0.086 0.391,-0.103C0.402,-0.119 0.409,-0.141 0.414,-0.167C0.419,-0.194 0.422,-0.226 0.422,-0.264Z" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(41,0,0,41,625.931,29.709)">
<rect x="0.091" y="-0.107" width="0.095" height="0.107" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(41,0,0,41,637.322,29.709)">
<path d="M0.134,-0.267C0.134,-0.236 0.136,-0.208 0.141,-0.183C0.145,-0.158 0.153,-0.136 0.163,-0.117C0.174,-0.099 0.187,-0.085 0.204,-0.075C0.221,-0.065 0.243,-0.06 0.268,-0.06C0.299,-0.06 0.325,-0.068 0.346,-0.085C0.367,-0.102 0.38,-0.128 0.385,-0.163L0.474,-0.157C0.471,-0.135 0.464,-0.114 0.455,-0.094C0.445,-0.074 0.432,-0.056 0.415,-0.041C0.398,-0.026 0.378,-0.013 0.354,-0.004C0.329,0.005 0.302,0.01 0.27,0.01C0.229,0.01 0.194,0.003 0.165,-0.011C0.136,-0.025 0.112,-0.045 0.094,-0.069C0.076,-0.094 0.063,-0.123 0.055,-0.156C0.047,-0.189 0.042,-0.226 0.042,-0.265C0.042,-0.3 0.045,-0.331 0.051,-0.359C0.057,-0.386 0.065,-0.41 0.076,-0.43C0.087,-0.45 0.099,-0.467 0.113,-0.481C0.128,-0.495 0.143,-0.506 0.16,-0.514C0.177,-0.523 0.194,-0.529 0.213,-0.532C0.231,-0.536 0.25,-0.538 0.269,-0.538C0.299,-0.538 0.325,-0.534 0.348,-0.526C0.371,-0.518 0.391,-0.507 0.408,-0.492C0.425,-0.478 0.438,-0.462 0.449,-0.442C0.459,-0.423 0.466,-0.403 0.471,-0.38L0.38,-0.374C0.376,-0.403 0.364,-0.426 0.346,-0.443C0.327,-0.461 0.301,-0.469 0.267,-0.469C0.242,-0.469 0.221,-0.465 0.204,-0.457C0.187,-0.448 0.174,-0.436 0.163,-0.419C0.153,-0.402 0.145,-0.381 0.141,-0.356C0.136,-0.331 0.134,-0.301 0.134,-0.267Z" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(41,0,0,41,657.822,29.709)">
<path d="M0.514,-0.265C0.514,-0.172 0.494,-0.103 0.453,-0.058C0.412,-0.013 0.353,0.01 0.276,0.01C0.239,0.01 0.206,0.004 0.177,-0.007C0.148,-0.018 0.124,-0.035 0.104,-0.058C0.084,-0.08 0.068,-0.109 0.058,-0.143C0.047,-0.178 0.042,-0.218 0.042,-0.265C0.042,-0.447 0.121,-0.538 0.279,-0.538C0.32,-0.538 0.355,-0.532 0.385,-0.521C0.415,-0.51 0.439,-0.493 0.458,-0.47C0.477,-0.447 0.491,-0.418 0.5,-0.384C0.51,-0.35 0.514,-0.31 0.514,-0.265ZM0.422,-0.265C0.422,-0.306 0.419,-0.34 0.412,-0.366C0.406,-0.393 0.397,-0.414 0.385,-0.43C0.372,-0.446 0.357,-0.457 0.34,-0.464C0.322,-0.47 0.302,-0.473 0.28,-0.473C0.258,-0.473 0.238,-0.47 0.219,-0.463C0.201,-0.456 0.186,-0.445 0.173,-0.429C0.161,-0.413 0.151,-0.391 0.144,-0.365C0.138,-0.338 0.134,-0.305 0.134,-0.265C0.134,-0.224 0.138,-0.19 0.145,-0.163C0.152,-0.136 0.162,-0.115 0.175,-0.099C0.187,-0.083 0.202,-0.071 0.219,-0.065C0.236,-0.058 0.255,-0.055 0.275,-0.055C0.297,-0.055 0.318,-0.058 0.336,-0.065C0.354,-0.071 0.37,-0.082 0.382,-0.098C0.395,-0.114 0.405,-0.136 0.412,-0.163C0.418,-0.19 0.422,-0.224 0.422,-0.265Z" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(41,0,0,41,680.624,29.709)">
<path d="M0.375,0L0.375,-0.335C0.375,-0.361 0.373,-0.382 0.37,-0.399C0.367,-0.417 0.361,-0.431 0.354,-0.441C0.346,-0.452 0.336,-0.459 0.324,-0.464C0.311,-0.468 0.296,-0.47 0.278,-0.47C0.26,-0.47 0.243,-0.467 0.228,-0.459C0.213,-0.452 0.2,-0.441 0.19,-0.427C0.179,-0.414 0.171,-0.397 0.165,-0.376C0.16,-0.356 0.157,-0.333 0.157,-0.306L0.157,0L0.069,0L0.069,-0.416C0.069,-0.427 0.069,-0.438 0.069,-0.45C0.069,-0.463 0.069,-0.474 0.068,-0.485C0.068,-0.496 0.068,-0.505 0.067,-0.513C0.067,-0.521 0.067,-0.526 0.066,-0.528L0.149,-0.528C0.15,-0.527 0.15,-0.522 0.15,-0.515C0.151,-0.508 0.151,-0.5 0.152,-0.49C0.152,-0.481 0.153,-0.472 0.153,-0.462C0.153,-0.453 0.153,-0.444 0.153,-0.438L0.155,-0.438C0.163,-0.453 0.171,-0.467 0.18,-0.479C0.189,-0.492 0.2,-0.502 0.212,-0.511C0.224,-0.52 0.238,-0.526 0.254,-0.531C0.27,-0.536 0.288,-0.538 0.309,-0.538C0.349,-0.538 0.381,-0.53 0.404,-0.514C0.427,-0.498 0.444,-0.473 0.453,-0.438L0.454,-0.438C0.462,-0.453 0.471,-0.467 0.48,-0.479C0.49,-0.492 0.502,-0.502 0.515,-0.511C0.528,-0.52 0.542,-0.526 0.559,-0.531C0.575,-0.536 0.593,-0.538 0.614,-0.538C0.641,-0.538 0.664,-0.535 0.683,-0.527C0.703,-0.52 0.719,-0.509 0.731,-0.494C0.743,-0.479 0.752,-0.46 0.758,-0.436C0.764,-0.413 0.767,-0.385 0.767,-0.352L0.767,0L0.68,0L0.68,-0.335C0.68,-0.361 0.679,-0.382 0.675,-0.399C0.672,-0.417 0.667,-0.431 0.659,-0.441C0.651,-0.452 0.641,-0.459 0.629,-0.464C0.617,-0.468 0.601,-0.47 0.583,-0.47C0.565,-0.47 0.548,-0.467 0.533,-0.46C0.518,-0.453 0.505,-0.442 0.495,-0.429C0.484,-0.415 0.476,-0.398 0.47,-0.377C0.465,-0.357 0.462,-0.333 0.462,-0.306L0.462,0L0.375,0Z" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(41,0,0,41,714.777,29.709)">
<path d="M0,0.01L0.201,-0.725L0.278,-0.725L0.079,0.01L0,0.01Z" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(41,0,0,41,726.168,29.709)">
<path d="M0.614,-0.481C0.614,-0.451 0.609,-0.423 0.599,-0.397C0.589,-0.371 0.575,-0.349 0.555,-0.33C0.535,-0.311 0.511,-0.296 0.481,-0.285C0.451,-0.274 0.417,-0.268 0.377,-0.268L0.175,-0.268L0.175,0L0.082,0L0.082,-0.688L0.372,-0.688C0.412,-0.688 0.448,-0.683 0.478,-0.673C0.508,-0.663 0.534,-0.649 0.554,-0.631C0.574,-0.613 0.589,-0.591 0.599,-0.566C0.609,-0.54 0.614,-0.512 0.614,-0.481ZM0.521,-0.48C0.521,-0.524 0.507,-0.557 0.48,-0.579C0.454,-0.602 0.414,-0.613 0.36,-0.613L0.175,-0.613L0.175,-0.342L0.364,-0.342C0.418,-0.342 0.457,-0.354 0.483,-0.377C0.508,-0.401 0.521,-0.435 0.521,-0.48Z" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(41,0,0,41,753.515,29.709)">
<path d="M0.547,0L0.547,-0.319L0.175,-0.319L0.175,0L0.082,0L0.082,-0.688L0.175,-0.688L0.175,-0.397L0.547,-0.397L0.547,-0.688L0.641,-0.688L0.641,0L0.547,0Z" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(41,0,0,41,783.124,29.709)">
<path d="M0.614,-0.481C0.614,-0.451 0.609,-0.423 0.599,-0.397C0.589,-0.371 0.575,-0.349 0.555,-0.33C0.535,-0.311 0.511,-0.296 0.481,-0.285C0.451,-0.274 0.417,-0.268 0.377,-0.268L0.175,-0.268L0.175,0L0.082,0L0.082,-0.688L0.372,-0.688C0.412,-0.688 0.448,-0.683 0.478,-0.673C0.508,-0.663 0.534,-0.649 0.554,-0.631C0.574,-0.613 0.589,-0.591 0.599,-0.566C0.609,-0.54 0.614,-0.512 0.614,-0.481ZM0.521,-0.48C0.521,-0.524 0.507,-0.557 0.48,-0.579C0.454,-0.602 0.414,-0.613 0.36,-0.613L0.175,-0.613L0.175,-0.342L0.364,-0.342C0.418,-0.342 0.457,-0.354 0.483,-0.377C0.508,-0.401 0.521,-0.435 0.521,-0.48Z" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(41,0,0,41,810.471,29.709)">
<path d="M0.667,0L0.667,-0.459C0.667,-0.476 0.667,-0.493 0.667,-0.51C0.668,-0.527 0.668,-0.543 0.669,-0.557C0.67,-0.574 0.67,-0.59 0.671,-0.605C0.667,-0.589 0.662,-0.572 0.657,-0.556C0.653,-0.542 0.648,-0.527 0.643,-0.511C0.638,-0.496 0.633,-0.481 0.628,-0.469L0.451,0L0.385,0L0.205,-0.469C0.203,-0.474 0.201,-0.479 0.199,-0.486L0.185,-0.529C0.182,-0.537 0.18,-0.544 0.178,-0.552C0.172,-0.569 0.167,-0.587 0.162,-0.605C0.162,-0.587 0.162,-0.569 0.163,-0.551C0.164,-0.536 0.164,-0.52 0.165,-0.503C0.165,-0.486 0.165,-0.472 0.165,-0.459L0.165,0L0.082,0L0.082,-0.688L0.205,-0.688L0.388,-0.211C0.39,-0.204 0.393,-0.196 0.396,-0.186C0.399,-0.176 0.402,-0.165 0.405,-0.154C0.408,-0.144 0.411,-0.133 0.413,-0.124C0.416,-0.114 0.417,-0.107 0.418,-0.102C0.419,-0.107 0.421,-0.114 0.424,-0.124C0.426,-0.134 0.429,-0.144 0.433,-0.155C0.436,-0.166 0.44,-0.176 0.443,-0.186C0.446,-0.196 0.449,-0.204 0.452,-0.211L0.631,-0.688L0.751,-0.688L0.751,0L0.667,0Z" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(41,0,0,41,844.624,29.709)">
<path d="M0.202,0.01C0.149,0.01 0.109,-0.004 0.083,-0.032C0.056,-0.06 0.042,-0.099 0.042,-0.147C0.042,-0.182 0.049,-0.211 0.062,-0.233C0.075,-0.255 0.093,-0.273 0.114,-0.286C0.135,-0.298 0.16,-0.307 0.187,-0.312C0.214,-0.317 0.242,-0.32 0.271,-0.32L0.389,-0.322L0.389,-0.351C0.389,-0.373 0.387,-0.391 0.382,-0.407C0.378,-0.422 0.371,-0.434 0.361,-0.444C0.352,-0.453 0.34,-0.46 0.326,-0.465C0.312,-0.469 0.295,-0.471 0.276,-0.471C0.259,-0.471 0.244,-0.47 0.23,-0.468C0.216,-0.465 0.204,-0.461 0.194,-0.454C0.184,-0.448 0.176,-0.439 0.17,-0.428C0.164,-0.418 0.16,-0.404 0.158,-0.387L0.066,-0.396C0.069,-0.416 0.075,-0.435 0.084,-0.453C0.094,-0.47 0.107,-0.485 0.123,-0.498C0.14,-0.511 0.161,-0.521 0.186,-0.528C0.212,-0.535 0.242,-0.538 0.278,-0.538C0.344,-0.538 0.394,-0.523 0.428,-0.492C0.461,-0.462 0.478,-0.418 0.478,-0.36L0.478,-0.133C0.478,-0.107 0.481,-0.087 0.488,-0.074C0.495,-0.061 0.508,-0.054 0.527,-0.054C0.532,-0.054 0.537,-0.055 0.542,-0.055C0.547,-0.056 0.552,-0.057 0.556,-0.058L0.556,-0.003C0.545,0 0.534,0.002 0.523,0.003C0.512,0.004 0.501,0.005 0.488,0.005C0.472,0.005 0.457,0.003 0.446,-0.002C0.434,-0.006 0.424,-0.013 0.417,-0.022C0.409,-0.031 0.403,-0.042 0.399,-0.055C0.396,-0.068 0.393,-0.083 0.392,-0.101L0.389,-0.101C0.38,-0.084 0.369,-0.069 0.358,-0.055C0.347,-0.042 0.334,-0.03 0.319,-0.02C0.304,-0.011 0.287,-0.003 0.268,0.002C0.249,0.007 0.227,0.01 0.202,0.01ZM0.222,-0.056C0.25,-0.056 0.275,-0.061 0.296,-0.072C0.317,-0.082 0.334,-0.095 0.348,-0.111C0.362,-0.127 0.372,-0.144 0.379,-0.163C0.386,-0.182 0.389,-0.2 0.389,-0.217L0.389,-0.261L0.293,-0.259C0.271,-0.258 0.251,-0.257 0.232,-0.254C0.212,-0.251 0.195,-0.246 0.181,-0.238C0.166,-0.23 0.154,-0.218 0.146,-0.204C0.137,-0.189 0.133,-0.17 0.133,-0.146C0.133,-0.117 0.141,-0.095 0.156,-0.08C0.171,-0.064 0.194,-0.056 0.222,-0.056Z" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(41,0,0,41,867.426,29.709)">
<path d="M0.067,-0.641L0.067,-0.725L0.155,-0.725L0.155,-0.641L0.067,-0.641ZM0.067,0L0.067,-0.528L0.155,-0.528L0.155,0L0.067,0Z" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(41,0,0,41,876.535,29.709)">
<rect x="0.067" y="-0.725" width="0.088" height="0.725" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(41,0,0,41,885.644,29.709)">
<path d="M0.135,-0.246C0.135,-0.218 0.138,-0.192 0.143,-0.169C0.149,-0.146 0.158,-0.126 0.17,-0.109C0.182,-0.092 0.197,-0.079 0.215,-0.07C0.234,-0.061 0.256,-0.056 0.282,-0.056C0.32,-0.056 0.351,-0.064 0.374,-0.079C0.397,-0.094 0.412,-0.114 0.42,-0.137L0.498,-0.115C0.492,-0.101 0.484,-0.086 0.474,-0.071C0.464,-0.056 0.451,-0.043 0.435,-0.031C0.418,-0.019 0.397,-0.009 0.372,-0.002C0.347,0.006 0.317,0.01 0.282,0.01C0.204,0.01 0.145,-0.014 0.104,-0.06C0.063,-0.107 0.042,-0.176 0.042,-0.268C0.042,-0.317 0.049,-0.359 0.061,-0.393C0.073,-0.428 0.09,-0.456 0.112,-0.477C0.133,-0.499 0.158,-0.514 0.187,-0.524C0.216,-0.533 0.246,-0.538 0.279,-0.538C0.323,-0.538 0.36,-0.531 0.39,-0.517C0.42,-0.502 0.444,-0.483 0.462,-0.457C0.48,-0.432 0.493,-0.402 0.5,-0.368C0.508,-0.334 0.512,-0.297 0.512,-0.257L0.512,-0.246L0.135,-0.246ZM0.421,-0.313C0.416,-0.369 0.402,-0.409 0.378,-0.435C0.355,-0.46 0.321,-0.473 0.277,-0.473C0.263,-0.473 0.247,-0.471 0.231,-0.466C0.215,-0.461 0.2,-0.453 0.187,-0.441C0.173,-0.429 0.161,-0.413 0.152,-0.392C0.142,-0.371 0.137,-0.345 0.136,-0.313L0.421,-0.313Z" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(41,0,0,41,908.446,29.709)">
<path d="M0.069,0L0.069,-0.405C0.069,-0.416 0.069,-0.428 0.069,-0.439C0.069,-0.451 0.069,-0.462 0.068,-0.473C0.068,-0.483 0.068,-0.493 0.067,-0.503C0.067,-0.512 0.067,-0.521 0.066,-0.528L0.149,-0.528L0.152,-0.473C0.153,-0.463 0.153,-0.453 0.153,-0.444C0.153,-0.435 0.153,-0.427 0.153,-0.42L0.155,-0.42C0.161,-0.441 0.168,-0.458 0.175,-0.473C0.182,-0.488 0.19,-0.5 0.2,-0.51C0.209,-0.519 0.22,-0.526 0.233,-0.531C0.246,-0.536 0.262,-0.538 0.281,-0.538C0.288,-0.538 0.295,-0.538 0.301,-0.536C0.308,-0.535 0.313,-0.534 0.316,-0.533L0.316,-0.453C0.311,-0.454 0.304,-0.455 0.296,-0.456C0.288,-0.457 0.279,-0.458 0.27,-0.458C0.249,-0.458 0.232,-0.453 0.218,-0.444C0.204,-0.435 0.192,-0.422 0.183,-0.406C0.174,-0.39 0.168,-0.371 0.164,-0.348C0.159,-0.326 0.157,-0.302 0.157,-0.275L0.157,0L0.069,0Z" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(41,0,0,41,922.1,29.709)">
<path d="M0,0.01L0.201,-0.725L0.278,-0.725L0.079,0.01L0,0.01Z" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(41,0,0,41,933.491,29.709)">
<path d="M0.614,-0.481C0.614,-0.451 0.609,-0.423 0.599,-0.397C0.589,-0.371 0.575,-0.349 0.555,-0.33C0.535,-0.311 0.511,-0.296 0.481,-0.285C0.451,-0.274 0.417,-0.268 0.377,-0.268L0.175,-0.268L0.175,0L0.082,0L0.082,-0.688L0.372,-0.688C0.412,-0.688 0.448,-0.683 0.478,-0.673C0.508,-0.663 0.534,-0.649 0.554,-0.631C0.574,-0.613 0.589,-0.591 0.599,-0.566C0.609,-0.54 0.614,-0.512 0.614,-0.481ZM0.521,-0.48C0.521,-0.524 0.507,-0.557 0.48,-0.579C0.454,-0.602 0.414,-0.613 0.36,-0.613L0.175,-0.613L0.175,-0.342L0.364,-0.342C0.418,-0.342 0.457,-0.354 0.483,-0.377C0.508,-0.401 0.521,-0.435 0.521,-0.48Z" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(41,0,0,41,960.837,29.709)">
<path d="M0.547,0L0.547,-0.319L0.175,-0.319L0.175,0L0.082,0L0.082,-0.688L0.175,-0.688L0.175,-0.397L0.547,-0.397L0.547,-0.688L0.641,-0.688L0.641,0L0.547,0Z" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(41,0,0,41,990.446,29.709)">
<path d="M0.614,-0.481C0.614,-0.451 0.609,-0.423 0.599,-0.397C0.589,-0.371 0.575,-0.349 0.555,-0.33C0.535,-0.311 0.511,-0.296 0.481,-0.285C0.451,-0.274 0.417,-0.268 0.377,-0.268L0.175,-0.268L0.175,0L0.082,0L0.082,-0.688L0.372,-0.688C0.412,-0.688 0.448,-0.683 0.478,-0.673C0.508,-0.663 0.534,-0.649 0.554,-0.631C0.574,-0.613 0.589,-0.591 0.599,-0.566C0.609,-0.54 0.614,-0.512 0.614,-0.481ZM0.521,-0.48C0.521,-0.524 0.507,-0.557 0.48,-0.579C0.454,-0.602 0.414,-0.613 0.36,-0.613L0.175,-0.613L0.175,-0.342L0.364,-0.342C0.418,-0.342 0.457,-0.354 0.483,-0.377C0.508,-0.401 0.521,-0.435 0.521,-0.48Z" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(41,0,0,41,1017.79,29.709)">
<path d="M0.667,0L0.667,-0.459C0.667,-0.476 0.667,-0.493 0.667,-0.51C0.668,-0.527 0.668,-0.543 0.669,-0.557C0.67,-0.574 0.67,-0.59 0.671,-0.605C0.667,-0.589 0.662,-0.572 0.657,-0.556C0.653,-0.542 0.648,-0.527 0.643,-0.511C0.638,-0.496 0.633,-0.481 0.628,-0.469L0.451,0L0.385,0L0.205,-0.469C0.203,-0.474 0.201,-0.479 0.199,-0.486L0.185,-0.529C0.182,-0.537 0.18,-0.544 0.178,-0.552C0.172,-0.569 0.167,-0.587 0.162,-0.605C0.162,-0.587 0.162,-0.569 0.163,-0.551C0.164,-0.536 0.164,-0.52 0.165,-0.503C0.165,-0.486 0.165,-0.472 0.165,-0.459L0.165,0L0.082,0L0.082,-0.688L0.205,-0.688L0.388,-0.211C0.39,-0.204 0.393,-0.196 0.396,-0.186C0.399,-0.176 0.402,-0.165 0.405,-0.154C0.408,-0.144 0.411,-0.133 0.413,-0.124C0.416,-0.114 0.417,-0.107 0.418,-0.102C0.419,-0.107 0.421,-0.114 0.424,-0.124C0.426,-0.134 0.429,-0.144 0.433,-0.155C0.436,-0.166 0.44,-0.176 0.443,-0.186C0.446,-0.196 0.449,-0.204 0.452,-0.211L0.631,-0.688L0.751,-0.688L0.751,0L0.667,0Z" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(41,0,0,41,1051.95,29.709)">
<path d="M0.202,0.01C0.149,0.01 0.109,-0.004 0.083,-0.032C0.056,-0.06 0.042,-0.099 0.042,-0.147C0.042,-0.182 0.049,-0.211 0.062,-0.233C0.075,-0.255 0.093,-0.273 0.114,-0.286C0.135,-0.298 0.16,-0.307 0.187,-0.312C0.214,-0.317 0.242,-0.32 0.271,-0.32L0.389,-0.322L0.389,-0.351C0.389,-0.373 0.387,-0.391 0.382,-0.407C0.378,-0.422 0.371,-0.434 0.361,-0.444C0.352,-0.453 0.34,-0.46 0.326,-0.465C0.312,-0.469 0.295,-0.471 0.276,-0.471C0.259,-0.471 0.244,-0.47 0.23,-0.468C0.216,-0.465 0.204,-0.461 0.194,-0.454C0.184,-0.448 0.176,-0.439 0.17,-0.428C0.164,-0.418 0.16,-0.404 0.158,-0.387L0.066,-0.396C0.069,-0.416 0.075,-0.435 0.084,-0.453C0.094,-0.47 0.107,-0.485 0.123,-0.498C0.14,-0.511 0.161,-0.521 0.186,-0.528C0.212,-0.535 0.242,-0.538 0.278,-0.538C0.344,-0.538 0.394,-0.523 0.428,-0.492C0.461,-0.462 0.478,-0.418 0.478,-0.36L0.478,-0.133C0.478,-0.107 0.481,-0.087 0.488,-0.074C0.495,-0.061 0.508,-0.054 0.527,-0.054C0.532,-0.054 0.537,-0.055 0.542,-0.055C0.547,-0.056 0.552,-0.057 0.556,-0.058L0.556,-0.003C0.545,0 0.534,0.002 0.523,0.003C0.512,0.004 0.501,0.005 0.488,0.005C0.472,0.005 0.457,0.003 0.446,-0.002C0.434,-0.006 0.424,-0.013 0.417,-0.022C0.409,-0.031 0.403,-0.042 0.399,-0.055C0.396,-0.068 0.393,-0.083 0.392,-0.101L0.389,-0.101C0.38,-0.084 0.369,-0.069 0.358,-0.055C0.347,-0.042 0.334,-0.03 0.319,-0.02C0.304,-0.011 0.287,-0.003 0.268,0.002C0.249,0.007 0.227,0.01 0.202,0.01ZM0.222,-0.056C0.25,-0.056 0.275,-0.061 0.296,-0.072C0.317,-0.082 0.334,-0.095 0.348,-0.111C0.362,-0.127 0.372,-0.144 0.379,-0.163C0.386,-0.182 0.389,-0.2 0.389,-0.217L0.389,-0.261L0.293,-0.259C0.271,-0.258 0.251,-0.257 0.232,-0.254C0.212,-0.251 0.195,-0.246 0.181,-0.238C0.166,-0.23 0.154,-0.218 0.146,-0.204C0.137,-0.189 0.133,-0.17 0.133,-0.146C0.133,-0.117 0.141,-0.095 0.156,-0.08C0.171,-0.064 0.194,-0.056 0.222,-0.056Z" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(41,0,0,41,1074.75,29.709)">
<path d="M0.067,-0.641L0.067,-0.725L0.155,-0.725L0.155,-0.641L0.067,-0.641ZM0.067,0L0.067,-0.528L0.155,-0.528L0.155,0L0.067,0Z" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(41,0,0,41,1083.86,29.709)">
<rect x="0.067" y="-0.725" width="0.088" height="0.725" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(41,0,0,41,1092.97,29.709)">
<path d="M0.135,-0.246C0.135,-0.218 0.138,-0.192 0.143,-0.169C0.149,-0.146 0.158,-0.126 0.17,-0.109C0.182,-0.092 0.197,-0.079 0.215,-0.07C0.234,-0.061 0.256,-0.056 0.282,-0.056C0.32,-0.056 0.351,-0.064 0.374,-0.079C0.397,-0.094 0.412,-0.114 0.42,-0.137L0.498,-0.115C0.492,-0.101 0.484,-0.086 0.474,-0.071C0.464,-0.056 0.451,-0.043 0.435,-0.031C0.418,-0.019 0.397,-0.009 0.372,-0.002C0.347,0.006 0.317,0.01 0.282,0.01C0.204,0.01 0.145,-0.014 0.104,-0.06C0.063,-0.107 0.042,-0.176 0.042,-0.268C0.042,-0.317 0.049,-0.359 0.061,-0.393C0.073,-0.428 0.09,-0.456 0.112,-0.477C0.133,-0.499 0.158,-0.514 0.187,-0.524C0.216,-0.533 0.246,-0.538 0.279,-0.538C0.323,-0.538 0.36,-0.531 0.39,-0.517C0.42,-0.502 0.444,-0.483 0.462,-0.457C0.48,-0.432 0.493,-0.402 0.5,-0.368C0.508,-0.334 0.512,-0.297 0.512,-0.257L0.512,-0.246L0.135,-0.246ZM0.421,-0.313C0.416,-0.369 0.402,-0.409 0.378,-0.435C0.355,-0.46 0.321,-0.473 0.277,-0.473C0.263,-0.473 0.247,-0.471 0.231,-0.466C0.215,-0.461 0.2,-0.453 0.187,-0.441C0.173,-0.429 0.161,-0.413 0.152,-0.392C0.142,-0.371 0.137,-0.345 0.136,-0.313L0.421,-0.313Z" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
<g transform="matrix(41,0,0,41,1115.77,29.709)">
<path d="M0.069,0L0.069,-0.405C0.069,-0.416 0.069,-0.428 0.069,-0.439C0.069,-0.451 0.069,-0.462 0.068,-0.473C0.068,-0.483 0.068,-0.493 0.067,-0.503C0.067,-0.512 0.067,-0.521 0.066,-0.528L0.149,-0.528L0.152,-0.473C0.153,-0.463 0.153,-0.453 0.153,-0.444C0.153,-0.435 0.153,-0.427 0.153,-0.42L0.155,-0.42C0.161,-0.441 0.168,-0.458 0.175,-0.473C0.182,-0.488 0.19,-0.5 0.2,-0.51C0.209,-0.519 0.22,-0.526 0.233,-0.531C0.246,-0.536 0.262,-0.538 0.281,-0.538C0.288,-0.538 0.295,-0.538 0.301,-0.536C0.308,-0.535 0.313,-0.534 0.316,-0.533L0.316,-0.453C0.311,-0.454 0.304,-0.455 0.296,-0.456C0.288,-0.457 0.279,-0.458 0.27,-0.458C0.249,-0.458 0.232,-0.453 0.218,-0.444C0.204,-0.435 0.192,-0.422 0.183,-0.406C0.174,-0.39 0.168,-0.371 0.164,-0.348C0.159,-0.326 0.157,-0.302 0.157,-0.275L0.157,0L0.069,0Z" style="fill:rgb(255,254,254);fill-rule:nonzero;"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 53 KiB

View File

@ -1,4 +1,5 @@
<?php
/**
* This example shows sending a message using PHP's mail() function.
*/
@ -9,7 +10,7 @@ use PHPMailer\PHPMailer\PHPMailer;
require '../vendor/autoload.php';
//Create a new PHPMailer instance
$mail = new PHPMailer;
$mail = new PHPMailer();
//Set who the message is to be sent from
$mail->setFrom('from@example.com', 'First Last');
//Set an alternative reply-to address
@ -28,7 +29,7 @@ $mail->addAttachment('images/phpmailer_mini.png');
//send the message, check for errors
if (!$mail->send()) {
echo "Mailer Error: " . $mail->ErrorInfo;
echo 'Mailer Error: ' . $mail->ErrorInfo;
} else {
echo "Message sent!";
echo 'Message sent!';
}

View File

@ -1,32 +1,38 @@
<?php
/**
* This example shows how to send a message to a whole list of recipients efficiently.
*/
//Import the PHPMailer class into the global namespace
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
error_reporting(E_STRICT | E_ALL);
error_reporting(E_ALL);
date_default_timezone_set('Etc/UTC');
require '../vendor/autoload.php';
$mail = new PHPMailer;
//Passing `true` enables PHPMailer exceptions
$mail = new PHPMailer(true);
$body = file_get_contents('contents.html');
$mail->isSMTP();
$mail->Host = 'smtp.example.com';
$mail->SMTPAuth = true;
$mail->SMTPKeepAlive = true; // SMTP connection will not close after each email sent, reduces SMTP overhead
$mail->SMTPKeepAlive = true; //SMTP connection will not close after each email sent, reduces SMTP overhead
$mail->Port = 25;
$mail->Username = 'yourname@example.com';
$mail->Password = 'yourpassword';
$mail->setFrom('list@example.com', 'List manager');
$mail->addReplyTo('list@example.com', 'List manager');
$mail->Subject = "PHPMailer Simple database mailing list test";
$mail->addCustomHeader(
'List-Unsubscribe',
'<mailto:unsubscribes@example.com>, <https://www.example.com/unsubscribe.php>'
);
$mail->Subject = 'PHPMailer Simple database mailing list test';
//Same body for all messages, so set this before the sending loop
//If you generate a different body for each recipient (e.g. you're using a templating system),
@ -42,24 +48,49 @@ mysqli_select_db($mysql, 'mydb');
$result = mysqli_query($mysql, 'SELECT full_name, email, photo FROM mailinglist WHERE sent = FALSE');
foreach ($result as $row) {
$mail->addAddress($row['email'], $row['full_name']);
if (!empty($row['photo'])) {
$mail->addStringAttachment($row['photo'], 'YourPhoto.jpg'); //Assumes the image data is stored in the DB
try {
$mail->addAddress($row['email'], $row['full_name']);
} catch (Exception $e) {
printf(
'Invalid address skipped: %s<br>',
htmlspecialchars($row['email'], ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401)
);
continue;
}
if (!empty($row['photo'])) {
//Assumes the image data is stored in the DB
$mail->addStringAttachment($row['photo'], 'YourPhoto.jpg');
}
$mail->replaceCustomHeader(
'List-Unsubscribe',
'<mailto:unsubscribes@example.com>, <https://www.example.com/unsubscribe.php?email=' .
rawurlencode($row['email']) . '>'
);
if (!$mail->send()) {
echo "Mailer Error (" . str_replace("@", "&#64;", $row["email"]) . ') ' . $mail->ErrorInfo . '<br />';
break; //Abandon sending
} else {
echo "Message sent to :" . $row['full_name'] . ' (' . str_replace("@", "&#64;", $row['email']) . ')<br />';
try {
$mail->send();
printf(
'Message sent to : %s (%s)<br>',
htmlspecialchars($row['full_name'], ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401),
htmlspecialchars($row['email'], ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401)
);
//Mark it as sent in the DB
mysqli_query(
$mysql,
"UPDATE mailinglist SET sent = TRUE WHERE email = '" .
mysqli_real_escape_string($mysql, $row['email']) . "'"
);
} catch (Exception $e) {
printf(
'Mailer Error (%s) %s<br>',
htmlspecialchars($row['email'], ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401),
$mail->ErrorInfo
);
//Reset the connection to abort sending this message
//The loop will continue trying to send to the rest of the list
$mail->getSMTPInstance()->reset();
}
// Clear all addresses and attachments for next loop
//Clear all addresses and attachments for the next iteration
$mail->clearAddresses();
$mail->clearAttachments();
}

View File

@ -1,4 +1,5 @@
<?php
/**
* This example shows how to use POP-before-SMTP for authentication.
* POP-before-SMTP is a very old technology that is hardly used any more.
@ -8,6 +9,7 @@
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
use PHPMailer\PHPMailer\POP3;
use PHPMailer\PHPMailer\SMTP;
require '../vendor/autoload.php';
@ -22,10 +24,10 @@ $mail = new PHPMailer(true);
try {
$mail->isSMTP();
//Enable SMTP debugging
// 0 = off (for production use)
// 1 = client messages
// 2 = client and server messages
$mail->SMTPDebug = 2;
//SMTP::DEBUG_OFF = off (for production use)
//SMTP::DEBUG_CLIENT = client messages
//SMTP::DEBUG_SERVER = client and server messages
$mail->SMTPDebug = SMTP::DEBUG_SERVER;
//Set the hostname of the mail server
$mail->Host = 'mail.example.com';
//Set the SMTP port number - likely to be 25, 465 or 587

View File

@ -1,4 +1,5 @@
<?php
/**
* PHPMailer simple file upload and send example.
*/
@ -6,27 +7,34 @@
//Import the PHPMailer class into the global namespace
use PHPMailer\PHPMailer\PHPMailer;
require '../vendor/autoload.php';
$msg = '';
if (array_key_exists('userfile', $_FILES)) {
// First handle the upload
// Don't trust provided filename - same goes for MIME types
// See http://php.net/manual/en/features.file-upload.php#114004 for more thorough upload validation
$uploadfile = tempnam(sys_get_temp_dir(), hash('sha256', $_FILES['userfile']['name']));
//First handle the upload
//Don't trust provided filename - same goes for MIME types
//See https://www.php.net/manual/en/features.file-upload.php#114004 for more thorough upload validation
//Extract an extension from the provided filename
$ext = PHPMailer::mb_pathinfo($_FILES['userfile']['name'], PATHINFO_EXTENSION);
//Define a safe location to move the uploaded file to, preserving the extension
$uploadfile = tempnam(sys_get_temp_dir(), hash('sha256', $_FILES['userfile']['name'])) . '.' . $ext;
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
// Upload handled successfully
// Now create a message
require '../vendor/autoload.php';
$mail = new PHPMailer;
//Upload handled successfully
//Now create a message
$mail = new PHPMailer();
$mail->setFrom('from@example.com', 'First Last');
$mail->addAddress('whoto@example.com', 'John Doe');
$mail->Subject = 'PHPMailer file sender';
$mail->Body = 'My message body';
// Attach the uploaded file
$mail->addAttachment($uploadfile, 'My uploaded file');
//Attach the uploaded file
if (!$mail->addAttachment($uploadfile, 'My uploaded file')) {
$msg .= 'Failed to attach file ' . $_FILES['userfile']['name'];
}
if (!$mail->send()) {
$msg .= "Mailer Error: " . $mail->ErrorInfo;
$msg .= 'Mailer Error: ' . $mail->ErrorInfo;
} else {
$msg .= "Message sent!";
$msg .= 'Message sent!';
}
} else {
$msg .= 'Failed to move file to ' . $uploadfile;
@ -34,7 +42,7 @@ if (array_key_exists('userfile', $_FILES)) {
}
?>
<!DOCTYPE html>
<html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>PHPMailer Upload</title>
@ -46,7 +54,7 @@ if (array_key_exists('userfile', $_FILES)) {
<input type="submit" value="Send File">
</form>
<?php } else {
echo $msg;
echo htmlspecialchars($msg, ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401);
} ?>
</body>
</html>
</html>

View File

@ -1,4 +1,5 @@
<?php
/**
* PHPMailer multiple files upload and send example
*/
@ -6,34 +7,40 @@
//Import the PHPMailer class into the global namespace
use PHPMailer\PHPMailer\PHPMailer;
require '../vendor/autoload.php';
$msg = '';
if (array_key_exists('userfile', $_FILES)) {
require '../vendor/autoload.php';
// Create a message
$mail = new PHPMailer;
//Create a message
$mail = new PHPMailer();
$mail->setFrom('from@example.com', 'First Last');
$mail->addAddress('whoto@example.com', 'John Doe');
$mail->Subject = 'PHPMailer file sender';
$mail->Body = 'My message body';
//Attach multiple files one by one
for ($ct = 0; $ct < count($_FILES['userfile']['tmp_name']); $ct++) {
$uploadfile = tempnam(sys_get_temp_dir(), hash('sha256', $_FILES['userfile']['name'][$ct]));
for ($ct = 0, $ctMax = count($_FILES['userfile']['tmp_name']); $ct < $ctMax; $ct++) {
//Extract an extension from the provided filename
$ext = PHPMailer::mb_pathinfo($_FILES['userfile']['name'][$ct], PATHINFO_EXTENSION);
//Define a safe location to move the uploaded file to, preserving the extension
$uploadfile = tempnam(sys_get_temp_dir(), hash('sha256', $_FILES['userfile']['name'][$ct])) . '.' . $ext;
$filename = $_FILES['userfile']['name'][$ct];
if (move_uploaded_file($_FILES['userfile']['tmp_name'][$ct], $uploadfile)) {
$mail->addAttachment($uploadfile, $filename);
if (!$mail->addAttachment($uploadfile, $filename)) {
$msg .= 'Failed to attach file ' . $filename;
}
} else {
$msg .= 'Failed to move file to ' . $uploadfile;
}
}
if (!$mail->send()) {
$msg .= "Mailer Error: " . $mail->ErrorInfo;
$msg .= 'Mailer Error: ' . $mail->ErrorInfo;
} else {
$msg .= "Message sent!";
$msg .= 'Message sent!';
}
}
?>
<!DOCTYPE html>
<html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>PHPMailer Upload</title>
@ -47,7 +54,7 @@ if (array_key_exists('userfile', $_FILES)) {
<input type="submit" value="Send Files">
</form>
<?php } else {
echo $msg;
echo htmlspecialchars($msg, ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401);
} ?>
</body>
</html>

View File

@ -1,4 +1,5 @@
<?php
/**
* This example shows sending a message using a local sendmail binary.
*/
@ -9,8 +10,8 @@ use PHPMailer\PHPMailer\PHPMailer;
require '../vendor/autoload.php';
//Create a new PHPMailer instance
$mail = new PHPMailer;
// Set PHPMailer to use the sendmail transport
$mail = new PHPMailer();
//Set PHPMailer to use the sendmail transport
$mail->isSendmail();
//Set who the message is to be sent from
$mail->setFrom('from@example.com', 'First Last');
@ -30,7 +31,7 @@ $mail->addAttachment('images/phpmailer_mini.png');
//send the message, check for errors
if (!$mail->send()) {
echo "Mailer Error: " . $mail->ErrorInfo;
echo 'Mailer Error: ' . $mail->ErrorInfo;
} else {
echo "Message sent!";
echo 'Message sent!';
}

100
examples/sendoauth2.phps Normal file
View File

@ -0,0 +1,100 @@
<?php
/**
* The SendOauth2 wrapper supports OAuth2 and Basic authorization/authentication for
* Microsoft 365 Exchange email and Google Gmail. Both TheLeague's Google provider + client
* and Google's 'official' GoogleAPI client are supported. The wrapper supports any authentication
* mechanism provided by these systems: authorization_code grant and client_credentials grant
* (aka Google 'service accounts'), client secrets and X.509 certificates, $_SESSION 'state'
* and PKCE code exchanges, and creation on the fly of GoogleAPI's .json credentials files.
* Appropriate scopes (client permissions) and 'provider' overrides are added automatically.
*
* The wrapper is installed with Composer from the decomplexity/SendOauth2 repo; see its README.
*
* The wrapper can also be invoked using fewer (or even no) arguments; this is for those websites
* that use PHPMailer in several places. See the repo for details.
*/
// Import PHPMailer classes
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;
use PHPMailer\PHPMailer\Exception;
// Import SendOauth2B class
use decomplexity\SendOauth2\SendOauth2B;
// Uncomment the next two lines to display PHP errors
// error_reporting(E_ALL);
// ini_set("display_errors", 1);
// Load Composer's autoloader
require 'vendor/autoload.php';
// Set timezone for SMTP
date_default_timezone_set('Etc/UTC');
// Create an instance; passing `true` enables exceptions
$mail = new PHPMailer(true);
try {
// Server settings
$mail->isSMTP(); // Use SMTP
$mail->SMTPDebug = SMTP::DEBUG_OFF; // Set DEBUG_LOWLEVEL for SMTP diagnostics
$mail->SMTPAuth = true; // Enable SMTP authentication
$mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; // Enable implicit TLS encryption
$mail->Port = 587; // TCP port; MSFT doesn't like 465
$mail->AuthType = 'XOAUTH2'; // Set AuthType to use XOAUTH2 ('LOGIN' for Basic auth)
// Sender and recipients
$mail->setFrom('from@example.com', 'Mailer'); // 'Header' From address with optional sender name
$mail->addAddress('joe@example.net', 'Joe User'); // Add a To: recipient
/**
* Authenticate
* Note that any ClientCertificatePrivateKey should include the -----BEGIN PRIVATE KEY----- and
* -----END PRIVATE KEY-----
*/
$oauthTokenProvider = new SendOauth2B(
[
'mail' => $mail, // PHPMailer instance
'clientId' => 'long string', // for Google service account, Unique ID
'clientSecret' => 'long string', // or null if using a certificate
'clientCertificatePrivateKey' => 'ultra long string', // or null if using a clientSecret
'clientCertificateThumbprint' => 'long string', // or null if using a clientSecret
'serviceProvider' => 'Microsoft', // literal: also 'Google' or 'GoogleAPI'
'authTypeSetting' => $mail->AuthType, // is set above - or insert here as 'XOAUTH2'
'mailSMTPAddress' => 'me@mydomain.com', // Envelope/mailFrom/reverse-path From address
'refreshToken' => 'very long string', // null if grantType is 'client_credentials'
'grantType' => 'authorization_code', // or 'client_credentials'
'tenant' => 'long string', // MSFT tenant GUID. Null for Gmail
'hostedDomain' => 'mydomain.com', // Any Google (and optional). Null for MSFT
'projectID' => 'string', // GoogleAPI only. Else null
'serviceAccountName' => 'string', // GoogleAPI service account only. Else null
'impersonate' => 'you@mydomain.com', // Google API service account only. Else null
// default to 'mailSMTPAddress', must be
// a Google Wspace email adddress, not @gmail
'gmailXoauth2Credentials' => 'your credentials.json', // File name - defaults to:
// gmail-xoauth2-credentials.json
'writeGmailCredentialsFile' => 'yes' or 'no', // Defaults to 'yes'; meaning the
// credentials json is dynamically created
]
);
$mail->setOAuth($oauthTokenProvider); // Pass OAuthTokenProvider to PHPMailer
$mail->Host = 'smtp.office365.com'; // Set SMTP server (smtp.gmail.com for Gmail)
// Content
$mail->isHTML(true); // Set email format to HTML
$mail->Subject = 'Here is the subject';
$mail->Body = 'This is the HTML message body <b>in bold!</b>';
$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
$mail->send();
echo 'Message has been sent';
} catch (Exception $e) {
echo 'Message could not be sent. Mailer Error: ' . htmlspecialchars($mail->ErrorInfo, ENT_QUOTES);
}

View File

@ -1,4 +1,5 @@
<?php
/**
* PHPMailer simple contact form example.
* If you want to accept and send uploads in your form, look at the send_file_upload example.
@ -9,7 +10,7 @@ use PHPMailer\PHPMailer\PHPMailer;
require '../vendor/autoload.php';
if (array_key_exists('to', $_POST)) {
if (array_key_exists('email', $_POST)) {
$err = false;
$msg = '';
$email = '';
@ -38,24 +39,24 @@ if (array_key_exists('to', $_POST)) {
//Validate to address
//Never allow arbitrary input for the 'to' address as it will turn your form into a spam gateway!
//Substitute appropriate addresses from your own domain, or simply use a single, fixed address
if (array_key_exists('to', $_POST) and in_array($_POST['to'], ['sales', 'support', 'accounts'])) {
if (array_key_exists('to', $_POST) && in_array($_POST['to'], ['sales', 'support', 'accounts'], true)) {
$to = $_POST['to'] . '@example.com';
} else {
$to = 'support@example.com';
}
//Make sure the address they provided is valid before trying to use it
if (array_key_exists('email', $_POST) and PHPMailer::validateAddress($_POST['email'])) {
if (PHPMailer::validateAddress($_POST['email'])) {
$email = $_POST['email'];
} else {
$msg .= "Error: invalid email address provided";
$msg .= 'Error: invalid email address provided';
$err = true;
}
if (!$err) {
$mail = new PHPMailer;
$mail = new PHPMailer();
$mail->isSMTP();
$mail->Host = 'localhost';
$mail->Port = 2500;
$mail->CharSet = 'utf-8';
$mail->Port = 25;
$mail->CharSet = PHPMailer::CHARSET_UTF8;
//It's important not to use the submitter's address as the from address as it's forgery,
//which will cause your messages to fail SPF checks.
//Use an address in your own domain as the from address, put the submitter's address in a reply-to
@ -65,14 +66,14 @@ if (array_key_exists('to', $_POST)) {
$mail->Subject = 'Contact form: ' . $subject;
$mail->Body = "Contact form submission\n\n" . $query;
if (!$mail->send()) {
$msg .= "Mailer Error: " . $mail->ErrorInfo;
$msg .= 'Mailer Error: ' . $mail->ErrorInfo;
} else {
$msg .= "Message sent!";
$msg .= 'Message sent!';
}
}
} ?>
<!DOCTYPE html>
<html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>PHPMailer Contact Form</title>
@ -98,4 +99,4 @@ if (array_key_exists('to', $_POST)) {
echo $msg;
} ?>
</body>
</html>
</html>

View File

@ -1,4 +1,5 @@
<?php
/**
* This PHPMailer example shows S/MIME signing a message and then sending.
*
@ -8,7 +9,7 @@
* STEP 1 - Creating a certificate:
* You can either use a self-signed certificate, pay for a signed one,
* or use free alternatives such as StartSSL, Comodo etc.
* Check out this link for more providers: http://kb.mozillazine.org/Getting_an_SMIME_certificate
* Check out this link for more providers: https://kb.mozillazine.org/Getting_an_SMIME_certificate
* In this example I am using Comodo.
* The form is directly available via https://secure.comodo.com/products/frontpage?area=SecureEmailCertificate
* Fill it out and you'll get an email with a link to download your certificate.
@ -53,7 +54,7 @@ use PHPMailer\PHPMailer\PHPMailer;
require '../vendor/autoload.php';
//Create a new PHPMailer instance
$mail = new PHPMailer;
$mail = new PHPMailer();
//Set who the message is to be sent from
//IMPORTANT: This must match the email address of your certificate.
//Although the certificate will be valid, an error will be thrown since it cannot be verified
@ -85,9 +86,9 @@ $mail->sign(
//Send the message, check for errors
if (!$mail->send()) {
echo "Mailer Error: " . $mail->ErrorInfo;
echo 'Mailer Error: ' . $mail->ErrorInfo;
} else {
echo "Message sent!";
echo 'Message sent!';
}
/*
* REMARKS:

View File

@ -1,10 +1,12 @@
<?php
/**
* This example shows making an SMTP connection with authentication.
*/
//Import the PHPMailer class into the global namespace
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;
//SMTP needs accurate times, and the PHP time zone MUST be set
//This should be done in your php.ini, but this is how to do it if you don't have access to that
@ -13,14 +15,14 @@ date_default_timezone_set('Etc/UTC');
require '../vendor/autoload.php';
//Create a new PHPMailer instance
$mail = new PHPMailer;
$mail = new PHPMailer();
//Tell PHPMailer to use SMTP
$mail->isSMTP();
//Enable SMTP debugging
// 0 = off (for production use)
// 1 = client messages
// 2 = client and server messages
$mail->SMTPDebug = 2;
//SMTP::DEBUG_OFF = off (for production use)
//SMTP::DEBUG_CLIENT = client messages
//SMTP::DEBUG_SERVER = client and server messages
$mail->SMTPDebug = SMTP::DEBUG_SERVER;
//Set the hostname of the mail server
$mail->Host = 'mail.example.com';
//Set the SMTP port number - likely to be 25, 465 or 587
@ -47,6 +49,11 @@ $mail->AltBody = 'This is a plain-text message body';
//Attach an image file
$mail->addAttachment('images/phpmailer_mini.png');
//SMTP XCLIENT attributes can be passed with setSMTPXclientAttribute method
//$mail->setSMTPXclientAttribute('LOGIN', 'yourname@example.com');
//$mail->setSMTPXclientAttribute('ADDR', '10.10.10.10');
//$mail->setSMTPXclientAttribute('HELO', 'test.example.com');
//send the message, check for errors
if (!$mail->send()) {
echo 'Mailer Error: ' . $mail->ErrorInfo;

View File

@ -1,4 +1,5 @@
<?php
/**
* This uses the SMTP class alone to check that a connection can be made to an SMTP server,
* authenticate, then disconnect
@ -15,7 +16,7 @@ require '../vendor/autoload.php';
date_default_timezone_set('Etc/UTC');
//Create a new SMTP instance
$smtp = new SMTP;
$smtp = new SMTP();
//Enable connection-level debug output
$smtp->do_debug = SMTP::DEBUG_CONNECTION;
@ -47,7 +48,7 @@ try {
//If server supports authentication, do it (even if no encryption)
if (is_array($e) && array_key_exists('AUTH', $e)) {
if ($smtp->authenticate('username', 'password')) {
echo "Connected ok!";
echo 'Connected ok!';
} else {
throw new Exception('Authentication failed: ' . $smtp->getError()['error']);
}
@ -56,4 +57,4 @@ try {
echo 'SMTP error: ' . $e->getMessage(), "\n";
}
//Whatever happened, close the connection.
$smtp->quit(true);
$smtp->quit();

View File

@ -1,16 +1,16 @@
<?php
/**
* SMTP low memory example.
*/
namespace PHPMailer\PHPMailer;
require '../vendor/autoload.php';
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;
/**
* This class demonstrates sending an already-built RFC822 message via SMTP
* by extending PHPMailer's SMTP class.
* It uses less memory that PHPMailer's usual approach because it keeps
* It uses less memory than PHPMailer's usual approach because it keeps
* the message as a single string rather than splitting its lines into
* an array, which can consume very large amounts of memory if you have
* large attachments. The downside is that it's somewhat slower.
@ -30,11 +30,13 @@ class SMTPLowMemory extends SMTP
* According to rfc821 we should not send more than 1000 characters on a single line (including the LE)
* so we will break the data up into lines by \r and/or \n then if needed we will break each of those into
* smaller lines to fit within the limit.
* We will also look for lines that start with a '.' and prepend an additional '.'.
* NOTE: this does not count towards line-length limit.
* We will also look for lines that start with a '.' and prepend an additional '.' (which does not count
* towards the line-length limit), in order to implement the "dot stuffing" required by RFC5321 sections:
* https://datatracker.ietf.org/doc/html/rfc5321#section-4.5.2
* https://datatracker.ietf.org/doc/html/rfc5321#section-4.5.3.1.6.
*/
// Normalize line breaks
//Normalize line breaks
$msg_data = str_replace(["\r\n", "\r"], "\n", $msg_data);
/* To distinguish between a complete RFC822 message and a plain message body, we check if the first field
@ -59,7 +61,7 @@ class SMTPLowMemory extends SMTP
//Remember where we have got to
$offset += ($linelen + 1);
$lines_out = [];
if ($in_headers and $line == '') {
if ($in_headers && $line === '') {
$in_headers = false;
}
//We need to break this line up into several smaller lines
@ -90,7 +92,7 @@ class SMTPLowMemory extends SMTP
//Send the lines to the server
foreach ($lines_out as $line_out) {
//RFC2821 section 4.5.2
if (!empty($line_out) and $line_out[0] == '.') {
if (!empty($line_out) && $line_out[0] === '.') {
$line_out = '.' . $line_out;
}
$this->client_send($line_out . self::LE);
@ -100,7 +102,7 @@ class SMTPLowMemory extends SMTP
//Message data has been sent, complete the command
//Increase timelimit for end of DATA command
$savetimelimit = $this->Timelimit;
$this->Timelimit = $this->Timelimit * 2;
$this->Timelimit *= 2;
$result = $this->sendCommand('DATA END', '.', 250);
//Restore timelimit
$this->Timelimit = $savetimelimit;
@ -109,22 +111,7 @@ class SMTPLowMemory extends SMTP
}
}
/**
* We need to use a PHPMailer subclass to make it use our SMTP implementation.
* @package PHPMailer\PHPMailer
*/
class PHPMailerLowMemory extends PHPMailer
{
/**
* Patch in the new SMTP class.
* @return SMTP
*/
public function getSMTPInstance()
{
if (!is_object($this->smtp)) {
$this->smtp = new SMTPLowMemory;
}
return $this->smtp;
}
}
//To make PHPMailer use our custom SMTP class, we need to give it an instance
$mail = new PHPMailer(true);
$mail->setSMTPInstance(new SMTPLowMemory());
//Now carry on as normal

View File

@ -1,10 +1,12 @@
<?php
/**
* This example shows making an SMTP connection without using authentication.
*/
//Import the PHPMailer class into the global namespace
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;
//SMTP needs accurate times, and the PHP time zone MUST be set
//This should be done in your php.ini, but this is how to do it if you don't have access to that
@ -13,14 +15,14 @@ date_default_timezone_set('Etc/UTC');
require '../vendor/autoload.php';
//Create a new PHPMailer instance
$mail = new PHPMailer;
$mail = new PHPMailer();
//Tell PHPMailer to use SMTP
$mail->isSMTP();
//Enable SMTP debugging
// 0 = off (for production use)
// 1 = client messages
// 2 = client and server messages
$mail->SMTPDebug = 2;
//SMTP::DEBUG_OFF = off (for production use)
//SMTP::DEBUG_CLIENT = client messages
//SMTP::DEBUG_SERVER = client and server messages
$mail->SMTPDebug = SMTP::DEBUG_SERVER;
//Set the hostname of the mail server
$mail->Host = 'mail.example.com';
//Set the SMTP port number - likely to be 25, 465 or 587
@ -45,7 +47,7 @@ $mail->addAttachment('images/phpmailer_mini.png');
//send the message, check for errors
if (!$mail->send()) {
echo "Mailer Error: " . $mail->ErrorInfo;
echo 'Mailer Error: ' . $mail->ErrorInfo;
} else {
echo "Message sent!";
echo 'Message sent!';
}

View File

@ -1,10 +1,12 @@
<?php
/**
* This example shows settings to use when sending over SMTP with TLS and custom connection options.
*/
//Import the PHPMailer class into the global namespace
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;
//SMTP needs accurate times, and the PHP time zone MUST be set
//This should be done in your php.ini, but this is how to do it if you don't have access to that
@ -13,25 +15,29 @@ date_default_timezone_set('Etc/UTC');
require '../vendor/autoload.php';
//Create a new PHPMailer instance
$mail = new PHPMailer;
$mail = new PHPMailer();
//Tell PHPMailer to use SMTP
$mail->isSMTP();
//Enable SMTP debugging
// 0 = off (for production use)
// 1 = client messages
// 2 = client and server messages
$mail->SMTPDebug = 2;
//SMTP::DEBUG_OFF = off (for production use)
//SMTP::DEBUG_CLIENT = client messages
//SMTP::DEBUG_SERVER = client and server messages
$mail->SMTPDebug = SMTP::DEBUG_CONNECTION;
//Set the hostname of the mail server
$mail->Host = 'smtp.example.com';
//Set the SMTP port number - 587 for authenticated TLS, a.k.a. RFC4409 SMTP submission
$mail->Port = 587;
//Set the SMTP port number:
// - 465 for SMTP with implicit TLS, a.k.a. RFC8314 SMTPS or
// - 587 for SMTP+STARTTLS
$mail->Port = 465;
//Set the encryption system to use - ssl (deprecated) or tls
$mail->SMTPSecure = 'tls';
//Set the encryption mechanism to use:
// - SMTPS (implicit TLS on port 465) or
// - STARTTLS (explicit TLS on port 587)
$mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS;
//Custom connection options
//Note that these settings are INSECURE

View File

@ -1,4 +1,5 @@
<?php
/**
* PHPMailer - PHP email creation and transport class.
* PHP Version 5.5
@ -8,14 +9,15 @@
* @author Jim Jagielski (jimjag) <jimjag@gmail.com>
* @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net>
* @author Brent R. Matzelle (original founder)
* @copyright 2012 - 2017 Marcus Bointon
* @copyright 2012 - 2020 Marcus Bointon
* @copyright 2010 - 2012 Jim Jagielski
* @copyright 2004 - 2009 Andy Prevost
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
* @license https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html GNU Lesser General Public License
* @note This program is distributed in the hope that it will be useful - WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
*/
/**
* Get an OAuth2 token from an OAuth2 provider.
* * Install this script on your server so that it's accessible
@ -34,26 +36,43 @@ namespace PHPMailer\PHPMailer;
* Aliases for League Provider Classes
* Make sure you have added these to your composer.json and run `composer install`
* Plenty to choose from here:
* @see http://oauth2-client.thephpleague.com/providers/thirdparty/
* @see https://oauth2-client.thephpleague.com/providers/thirdparty/
*/
// @see https://github.com/thephpleague/oauth2-google
//@see https://github.com/thephpleague/oauth2-google
use League\OAuth2\Client\Provider\Google;
// @see https://packagist.org/packages/hayageek/oauth2-yahoo
//@see https://packagist.org/packages/hayageek/oauth2-yahoo
use Hayageek\OAuth2\Client\Provider\Yahoo;
// @see https://github.com/stevenmaguire/oauth2-microsoft
//@see https://github.com/stevenmaguire/oauth2-microsoft
use Stevenmaguire\OAuth2\Client\Provider\Microsoft;
//@see https://github.com/greew/oauth2-azure-provider
use Greew\OAuth2\Client\Provider\Azure;
if (!isset($_GET['code']) && !isset($_GET['provider'])) {
?>
if (!isset($_GET['code']) && !isset($_POST['provider'])) {
?>
<html>
<body>Select Provider:<br/>
<a href='?provider=Google'>Google</a><br/>
<a href='?provider=Yahoo'>Yahoo</a><br/>
<a href='?provider=Microsoft'>Microsoft/Outlook/Hotmail/Live/Office365</a><br/>
<body>
<form method="post">
<h1>Select Provider</h1>
<input type="radio" name="provider" value="Google" id="providerGoogle">
<label for="providerGoogle">Google</label><br>
<input type="radio" name="provider" value="Yahoo" id="providerYahoo">
<label for="providerYahoo">Yahoo</label><br>
<input type="radio" name="provider" value="Microsoft" id="providerMicrosoft">
<label for="providerMicrosoft">Microsoft</label><br>
<input type="radio" name="provider" value="Azure" id="providerAzure">
<label for="providerAzure">Azure</label><br>
<h1>Enter id and secret</h1>
<p>These details are obtained by setting up an app in your provider's developer console.
</p>
<p>ClientId: <input type="text" name="clientId"><p>
<p>ClientSecret: <input type="text" name="clientSecret"></p>
<p>TenantID (only relevant for Azure): <input type="text" name="tenantId"></p>
<input type="submit" value="Continue">
</form>
</body>
</html>
<?php
exit;
<?php
exit;
}
require 'vendor/autoload.php';
@ -61,21 +80,29 @@ require 'vendor/autoload.php';
session_start();
$providerName = '';
$clientId = '';
$clientSecret = '';
$tenantId = '';
if (array_key_exists('provider', $_GET)) {
$providerName = $_GET['provider'];
if (array_key_exists('provider', $_POST)) {
$providerName = $_POST['provider'];
$clientId = $_POST['clientId'];
$clientSecret = $_POST['clientSecret'];
$tenantId = $_POST['tenantId'];
$_SESSION['provider'] = $providerName;
$_SESSION['clientId'] = $clientId;
$_SESSION['clientSecret'] = $clientSecret;
$_SESSION['tenantId'] = $tenantId;
} elseif (array_key_exists('provider', $_SESSION)) {
$providerName = $_SESSION['provider'];
}
if (!in_array($providerName, ['Google', 'Microsoft', 'Yahoo'])) {
exit('Only Google, Microsoft and Yahoo OAuth2 providers are currently supported in this script.');
$clientId = $_SESSION['clientId'];
$clientSecret = $_SESSION['clientSecret'];
$tenantId = $_SESSION['tenantId'];
}
//These details are obtained by setting up an app in the Google developer console,
//or whichever provider you're using.
$clientId = 'RANDOMCHARS-----duv1n2.apps.googleusercontent.com';
$clientSecret = 'RANDOMCHARS-----lGyjPcRtvP';
//If you don't want to use the built-in form, set your client id and secret here
//$clientId = 'RANDOMCHARS-----duv1n2.apps.googleusercontent.com';
//$clientSecret = 'RANDOMCHARS-----lGyjPcRtvP';
//If this automatic URL doesn't work, set it yourself manually to the URL of this script
$redirectUri = (isset($_SERVER['HTTPS']) ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];
@ -112,6 +139,17 @@ switch ($providerName) {
]
];
break;
case 'Azure':
$params['tenantId'] = $tenantId;
$provider = new Azure($params);
$options = [
'scope' => [
'https://outlook.office.com/SMTP.Send',
'offline_access'
]
];
break;
}
if (null === $provider) {
@ -119,26 +157,26 @@ if (null === $provider) {
}
if (!isset($_GET['code'])) {
// If we don't have an authorization code then get one
//If we don't have an authorization code then get one
$authUrl = $provider->getAuthorizationUrl($options);
$_SESSION['oauth2state'] = $provider->getState();
header('Location: ' . $authUrl);
exit;
// Check given state against previously stored one to mitigate CSRF attack
//Check given state against previously stored one to mitigate CSRF attack
} elseif (empty($_GET['state']) || ($_GET['state'] !== $_SESSION['oauth2state'])) {
unset($_SESSION['oauth2state']);
unset($_SESSION['provider']);
exit('Invalid state');
} else {
unset($_SESSION['provider']);
// Try to get an access token (using the authorization code grant)
//Try to get an access token (using the authorization code grant)
$token = $provider->getAccessToken(
'authorization_code',
[
'code' => $_GET['code']
]
);
// Use this to interact with an API on the users behalf
// Use this to get a new access token if the old one expires
echo 'Refresh Token: ', $token->getRefreshToken();
//Use this to interact with an API on the users behalf
//Use this to get a new access token if the old one expires
echo 'Refresh Token: ', htmlspecialchars($token->getRefreshToken(), ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401);
}

View File

@ -0,0 +1,26 @@
<?php
/**
* Afrikaans PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
*/
$PHPMAILER_LANG['authenticate'] = 'SMTP-fout: kon nie geverifieer word nie.';
$PHPMAILER_LANG['connect_host'] = 'SMTP-fout: kon nie aan SMTP-verbind nie.';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP-fout: data nie aanvaar nie.';
$PHPMAILER_LANG['empty_message'] = 'Boodskapliggaam leeg.';
$PHPMAILER_LANG['encoding'] = 'Onbekende kodering: ';
$PHPMAILER_LANG['execute'] = 'Kon nie uitvoer nie: ';
$PHPMAILER_LANG['file_access'] = 'Kon nie lêer oopmaak nie: ';
$PHPMAILER_LANG['file_open'] = 'Lêerfout: Kon nie lêer oopmaak nie: ';
$PHPMAILER_LANG['from_failed'] = 'Die volgende Van adres misluk: ';
$PHPMAILER_LANG['instantiate'] = 'Kon nie posfunksie instansieer nie.';
$PHPMAILER_LANG['invalid_address'] = 'Ongeldige adres: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer word nie ondersteun nie.';
$PHPMAILER_LANG['provide_address'] = 'U moet ten minste een ontvanger e-pos adres verskaf.';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP-fout: Die volgende ontvangers het misluk: ';
$PHPMAILER_LANG['signing'] = 'Ondertekening Fout: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP-verbinding () misluk.';
$PHPMAILER_LANG['smtp_error'] = 'SMTP-bediener fout: ';
$PHPMAILER_LANG['variable_set'] = 'Kan nie veranderlike instel of herstel nie: ';
$PHPMAILER_LANG['extension_missing'] = 'Uitbreiding ontbreek: ';

View File

@ -1,4 +1,5 @@
<?php
/**
* Arabic PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
@ -18,10 +19,9 @@ $PHPMAILER_LANG['instantiate'] = 'لا يمكن توفير خدمة ا
$PHPMAILER_LANG['invalid_address'] = 'الإرسال غير ممكن لأن عنوان البريد الإلكتروني غير صالح: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' برنامج الإرسال غير مدعوم.';
$PHPMAILER_LANG['provide_address'] = 'يجب توفير عنوان البريد الإلكتروني لمستلم واحد على الأقل.';
$PHPMAILER_LANG['recipients_failed'] = 'خطأ SMTP: الأخطاء التالية ' .
'فشل في الارسال لكل من : ';
$PHPMAILER_LANG['recipients_failed'] = 'خطأ SMTP: الأخطاء التالية فشل في الارسال لكل من : ';
$PHPMAILER_LANG['signing'] = 'خطأ في التوقيع: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() غير ممكن.';
$PHPMAILER_LANG['smtp_error'] = 'خطأ على مستوى الخادم SMTP: ';
$PHPMAILER_LANG['variable_set'] = 'لا يمكن تعيين أو إعادة تعيين متغير: ';
//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
$PHPMAILER_LANG['extension_missing'] = 'الإضافة غير موجودة: ';

View File

@ -0,0 +1,35 @@
<?php
/**
* Assamese PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
* @author Manish Sarkar <manish.n.manish@gmail.com>
*/
$PHPMAILER_LANG['authenticate'] = 'SMTP ত্ৰুটি: প্ৰমাণীকৰণ কৰিব নোৱাৰি';
$PHPMAILER_LANG['buggy_php'] = 'আপোনাৰ PHP সংস্কৰণ এটা বাগৰ দ্বাৰা প্ৰভাৱিত হয় যাৰ ফলত নষ্ট বাৰ্তা হব পাৰে । ইয়াক সমাধান কৰিবলে, প্ৰেৰণ কৰিবলে SMTP ব্যৱহাৰ কৰক, আপোনাৰ php.ini ত mail.add_x_header বিকল্প নিষ্ক্ৰিয় কৰক, MacOS বা Linux লৈ সলনি কৰক, বা আপোনাৰ PHP সংস্কৰণ 7.0.17+ বা 7.1.3+ লৈ সলনি কৰক ।';
$PHPMAILER_LANG['connect_host'] = 'SMTP ত্ৰুটি: SMTP চাৰ্ভাৰৰ সৈতে সংযোগ কৰিবলে অক্ষম';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP ত্ৰুটি: তথ্য গ্ৰহণ কৰা হোৱা নাই';
$PHPMAILER_LANG['empty_message'] = 'বাৰ্তাৰ মূখ্য অংশ খালী।';
$PHPMAILER_LANG['encoding'] = 'অজ্ঞাত এনকোডিং: ';
$PHPMAILER_LANG['execute'] = 'এক্সিকিউট কৰিব নোৱাৰি: ';
$PHPMAILER_LANG['extension_missing'] = 'সম্প্ৰসাৰণ নোহোৱা হৈছে: ';
$PHPMAILER_LANG['file_access'] = 'ফাইল অভিগম কৰিবলে অক্ষম: ';
$PHPMAILER_LANG['file_open'] = 'ফাইল ত্ৰুটি: ফাইল খোলিবলৈ অক্ষম: ';
$PHPMAILER_LANG['from_failed'] = 'নিম্নলিখিত প্ৰেৰকৰ ঠিকনা(সমূহ) ব্যৰ্থ: ';
$PHPMAILER_LANG['instantiate'] = 'মেইল ফাংচনৰ এটা উদাহৰণ সৃষ্টি কৰিবলে অক্ষম';
$PHPMAILER_LANG['invalid_address'] = 'প্ৰেৰণ কৰিব নোৱাৰি: অবৈধ ইমেইল ঠিকনা: ';
$PHPMAILER_LANG['invalid_header'] = 'অবৈধ হেডাৰৰ নাম বা মান';
$PHPMAILER_LANG['invalid_hostentry'] = 'অবৈধ হোষ্টেন্ট্ৰি: ';
$PHPMAILER_LANG['invalid_host'] = 'অবৈধ হস্ট:';
$PHPMAILER_LANG['mailer_not_supported'] = 'মেইলাৰ সমৰ্থিত নহয়।';
$PHPMAILER_LANG['provide_address'] = 'আপুনি অন্ততঃ এটা গন্তব্য ইমেইল ঠিকনা দিব লাগিব';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP ত্ৰুটি: নিম্নলিখিত গন্তব্যস্থানসমূহ ব্যৰ্থ: ';
$PHPMAILER_LANG['signing'] = 'স্বাক্ষৰ কৰাত ব্যৰ্থ: ';
$PHPMAILER_LANG['smtp_code'] = 'SMTP কড: ';
$PHPMAILER_LANG['smtp_code_ex'] = 'অতিৰিক্ত SMTP তথ্য: ';
$PHPMAILER_LANG['smtp_detail'] = 'বিৱৰণ:';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP সংযোগ() ব্যৰ্থ';
$PHPMAILER_LANG['smtp_error'] = 'SMTP চাৰ্ভাৰৰ ত্ৰুটি: ';
$PHPMAILER_LANG['variable_set'] = 'চলক নিৰ্ধাৰণ কৰিব পৰা নগল: ';
$PHPMAILER_LANG['extension_missing'] = 'অনুপস্থিত সম্প্ৰসাৰণ: ';

View File

@ -1,4 +1,5 @@
<?php
/**
* Azerbaijani PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer

View File

@ -1,4 +1,5 @@
<?php
/**
* Bosnian PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
@ -23,4 +24,4 @@ $PHPMAILER_LANG['signing'] = 'Greška prilikom prijave: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'Spajanje na SMTP server nije uspjelo.';
$PHPMAILER_LANG['smtp_error'] = 'SMTP greška: ';
$PHPMAILER_LANG['variable_set'] = 'Nije moguće postaviti varijablu ili je vratiti nazad: ';
$PHPMAILER_LANG['extension_missing'] = 'Nedostaje ekstenzija: ';
$PHPMAILER_LANG['extension_missing'] = 'Nedostaje ekstenzija: ';

View File

@ -1,4 +1,5 @@
<?php
/**
* Belarusian PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer

View File

@ -1,4 +1,5 @@
<?php
/**
* Bulgarian PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer

View File

@ -0,0 +1,35 @@
<?php
/**
* Bengali PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
* @author Manish Sarkar <manish.n.manish@gmail.com>
*/
$PHPMAILER_LANG['authenticate'] = 'SMTP ত্রুটি: প্রমাণীকরণ করতে অক্ষম৷';
$PHPMAILER_LANG['buggy_php'] = 'আপনার PHP সংস্করণ একটি বাগ দ্বারা প্রভাবিত হয় যার ফলে দূষিত বার্তা হতে পারে। এটি ঠিক করতে, পাঠাতে SMTP ব্যবহার করুন, আপনার php.ini এ mail.add_x_header বিকল্পটি নিষ্ক্রিয় করুন, MacOS বা Linux-এ স্যুইচ করুন, অথবা আপনার PHP সংস্করণকে 7.0.17+ বা 7.1.3+ এ পরিবর্তন করুন।';
$PHPMAILER_LANG['connect_host'] = 'SMTP ত্রুটি: SMTP সার্ভারের সাথে সংযোগ করতে অক্ষম৷';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP ত্রুটি: ডেটা গ্রহণ করা হয়নি৷';
$PHPMAILER_LANG['empty_message'] = 'বার্তার অংশটি খালি।';
$PHPMAILER_LANG['encoding'] = 'অজানা এনকোডিং: ';
$PHPMAILER_LANG['execute'] = 'নির্বাহ করতে অক্ষম: ';
$PHPMAILER_LANG['extension_missing'] = 'এক্সটেনশন অনুপস্থিত:';
$PHPMAILER_LANG['file_access'] = 'ফাইল অ্যাক্সেস করতে অক্ষম: ';
$PHPMAILER_LANG['file_open'] = 'ফাইল ত্রুটি: ফাইল খুলতে অক্ষম: ';
$PHPMAILER_LANG['from_failed'] = 'নিম্নলিখিত প্রেরকের ঠিকানা(গুলি) ব্যর্থ হয়েছে: ';
$PHPMAILER_LANG['instantiate'] = 'মেল ফাংশনের একটি উদাহরণ তৈরি করতে অক্ষম৷';
$PHPMAILER_LANG['invalid_address'] = 'পাঠাতে অক্ষম: অবৈধ ইমেল ঠিকানা: ';
$PHPMAILER_LANG['invalid_header'] = 'অবৈধ হেডার নাম বা মান';
$PHPMAILER_LANG['invalid_hostentry'] = 'অবৈধ হোস্টেন্ট্রি: ';
$PHPMAILER_LANG['invalid_host'] = 'অবৈধ হোস্ট:';
$PHPMAILER_LANG['mailer_not_supported'] = 'মেইলার সমর্থিত নয়।';
$PHPMAILER_LANG['provide_address'] = 'আপনাকে অবশ্যই অন্তত একটি গন্তব্য ইমেল ঠিকানা প্রদান করতে হবে৷';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP ত্রুটি: নিম্নলিখিত গন্তব্যগুলি ব্যর্থ হয়েছে: ';
$PHPMAILER_LANG['signing'] = 'স্বাক্ষর করতে ব্যর্থ হয়েছে: ';
$PHPMAILER_LANG['smtp_code'] = 'SMTP কোড: ';
$PHPMAILER_LANG['smtp_code_ex'] = 'অতিরিক্ত SMTP তথ্য:';
$PHPMAILER_LANG['smtp_detail'] = 'বর্ণনা: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP সংযোগ() ব্যর্থ হয়েছে৷';
$PHPMAILER_LANG['smtp_error'] = 'SMTP সার্ভার ত্রুটি: ';
$PHPMAILER_LANG['variable_set'] = 'পরিবর্তনশীল সেট করা যায়নি: ';
$PHPMAILER_LANG['extension_missing'] = 'অনুপস্থিত এক্সটেনশন: ';

View File

@ -1,4 +1,5 @@
<?php
/**
* Catalan PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer

View File

@ -1,26 +0,0 @@
<?php
/**
* Chinese PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
* @author LiuXin <http://www.80x86.cn/blog/>
*/
$PHPMAILER_LANG['authenticate'] = 'SMTP 错误:身份验证失败。';
$PHPMAILER_LANG['connect_host'] = 'SMTP 错误: 不能连接SMTP主机。';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP 错误: 数据不可接受。';
//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
$PHPMAILER_LANG['encoding'] = '未知编码:';
$PHPMAILER_LANG['execute'] = '不能执行: ';
$PHPMAILER_LANG['file_access'] = '不能访问文件:';
$PHPMAILER_LANG['file_open'] = '文件错误:不能打开文件:';
$PHPMAILER_LANG['from_failed'] = '下面的发送地址邮件发送失败了: ';
$PHPMAILER_LANG['instantiate'] = '不能实现mail方法。';
//$PHPMAILER_LANG['invalid_address'] = 'Invalid address: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' 您所选择的发送邮件的方法并不支持。';
$PHPMAILER_LANG['provide_address'] = '您必须提供至少一个 收信人的email地址。';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP 错误: 下面的 收件人失败了: ';
//$PHPMAILER_LANG['signing'] = 'Signing Error: ';
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';

View File

@ -1,4 +1,5 @@
<?php
/**
* Czech PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
@ -15,6 +16,8 @@ $PHPMAILER_LANG['file_open'] = 'Chyba souboru: Nelze otevřít soubor
$PHPMAILER_LANG['from_failed'] = 'Následující adresa odesílatele je nesprávná: ';
$PHPMAILER_LANG['instantiate'] = 'Nelze vytvořit instanci emailové funkce.';
$PHPMAILER_LANG['invalid_address'] = 'Neplatná adresa: ';
$PHPMAILER_LANG['invalid_hostentry'] = 'Záznam hostitele je nesprávný: ';
$PHPMAILER_LANG['invalid_host'] = 'Hostitel je nesprávný: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer není podporován.';
$PHPMAILER_LANG['provide_address'] = 'Musíte zadat alespoň jednu emailovou adresu příjemce.';
$PHPMAILER_LANG['recipients_failed'] = 'Chyba SMTP: Následující adresy příjemců nejsou správně: ';

View File

@ -1,26 +1,39 @@
<?php
/**
* Danish PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
* @author Mikael Stokkebro <info@stokkebro.dk>
* @author John Sebastian <jms@iwb.dk>
* Rewrite and extension of the work by Mikael Stokkebro <info@stokkebro.dk>
*
*/
$PHPMAILER_LANG['authenticate'] = 'SMTP fejl: Kunne ikke logge på.';
$PHPMAILER_LANG['connect_host'] = 'SMTP fejl: Kunne ikke tilslutte SMTP serveren.';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP fejl: Data kunne ikke accepteres.';
//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
$PHPMAILER_LANG['authenticate'] = 'SMTP fejl: Login mislykkedes.';
$PHPMAILER_LANG['buggy_php'] = 'Din version af PHP er berørt af en fejl, som gør at dine beskeder muligvis vises forkert. For at rette dette kan du skifte til SMTP, slå mail.add_x_header headeren i din php.ini fil fra, skifte til MacOS eller Linux eller opgradere din version af PHP til 7.0.17+ eller 7.1.3+.';
$PHPMAILER_LANG['connect_host'] = 'SMTP fejl: Forbindelse til SMTP serveren kunne ikke oprettes.';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP fejl: Data blev ikke accepteret.';
$PHPMAILER_LANG['empty_message'] = 'Meddelelsen er uden indhold';
$PHPMAILER_LANG['encoding'] = 'Ukendt encode-format: ';
$PHPMAILER_LANG['execute'] = 'Kunne ikke køre: ';
$PHPMAILER_LANG['file_access'] = 'Ingen adgang til fil: ';
$PHPMAILER_LANG['execute'] = 'Kunne ikke afvikle: ';
$PHPMAILER_LANG['extension_missing'] = 'Udvidelse mangler: ';
$PHPMAILER_LANG['file_access'] = 'Kunne ikke tilgå filen: ';
$PHPMAILER_LANG['file_open'] = 'Fil fejl: Kunne ikke åbne filen: ';
$PHPMAILER_LANG['from_failed'] = 'Følgende afsenderadresse er forkert: ';
$PHPMAILER_LANG['instantiate'] = 'Kunne ikke initialisere email funktionen.';
//$PHPMAILER_LANG['invalid_address'] = 'Invalid address: ';
$PHPMAILER_LANG['instantiate'] = 'Email funktionen kunne ikke initialiseres.';
$PHPMAILER_LANG['invalid_address'] = 'Udgyldig adresse: ';
$PHPMAILER_LANG['invalid_header'] = 'Ugyldig header navn eller værdi';
$PHPMAILER_LANG['invalid_hostentry'] = 'Ugyldig hostentry: ';
$PHPMAILER_LANG['invalid_host'] = 'Ugyldig vært: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer understøttes ikke.';
$PHPMAILER_LANG['provide_address'] = 'Du skal indtaste mindst en modtagers emailadresse.';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP fejl: Følgende modtagere er forkerte: ';
//$PHPMAILER_LANG['signing'] = 'Signing Error: ';
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
$PHPMAILER_LANG['provide_address'] = 'Indtast mindst en modtagers email adresse.';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP fejl: Følgende modtagere fejlede: ';
$PHPMAILER_LANG['signing'] = 'Signeringsfejl: ';
$PHPMAILER_LANG['smtp_code'] = 'SMTP kode: ';
$PHPMAILER_LANG['smtp_code_ex'] = 'Yderligere SMTP info: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() fejlede.';
$PHPMAILER_LANG['smtp_detail'] = 'Detalje: ';
$PHPMAILER_LANG['smtp_error'] = 'SMTP server fejl: ';
$PHPMAILER_LANG['variable_set'] = 'Kunne ikke definere eller nulstille variablen: ';
$PHPMAILER_LANG['no_smtputf8'] = 'Serveren understøtter ikke SMTPUTF8 som påkrævet for at sende til Unicode adresser';
$PHPMAILER_LANG['imap_recommended'] = 'Brug af forenklet adresseparser anbefales ikke. Installer PHP IMAP udvidelsen for fuld RFC822 parsing.';
$PHPMAILER_LANG['deprecated_argument'] = 'Udfaset argument: ';

View File

@ -1,4 +1,5 @@
<?php
/**
* German PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
@ -15,6 +16,8 @@ $PHPMAILER_LANG['file_open'] = 'Dateifehler: Konnte folgende Datei ni
$PHPMAILER_LANG['from_failed'] = 'Die folgende Absenderadresse ist nicht korrekt: ';
$PHPMAILER_LANG['instantiate'] = 'Mail-Funktion konnte nicht initialisiert werden.';
$PHPMAILER_LANG['invalid_address'] = 'Die Adresse ist ungültig: ';
$PHPMAILER_LANG['invalid_hostentry'] = 'Ungültiger Hosteintrag: ';
$PHPMAILER_LANG['invalid_host'] = 'Ungültiger Host: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer wird nicht unterstützt.';
$PHPMAILER_LANG['provide_address'] = 'Bitte geben Sie mindestens eine Empfängeradresse an.';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP-Fehler: Die folgenden Empfänger sind nicht korrekt: ';

View File

@ -1,25 +1,33 @@
<?php
/**
* Greek PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
*/
$PHPMAILER_LANG['authenticate'] = 'SMTP Σφάλμα: Αδυναμία πιστοποίησης (authentication).';
$PHPMAILER_LANG['connect_host'] = 'SMTP Σφάλμα: Αδυναμία σύνδεσης στον SMTP-Host.';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Σφάλμα: Τα δεδομένα δεν έγιναν αποδεκτά.';
$PHPMAILER_LANG['empty_message'] = 'Το E-Mail δεν έχει περιεχόμενο .';
$PHPMAILER_LANG['encoding'] = 'Αγνωστο Encoding-Format: ';
$PHPMAILER_LANG['execute'] = 'Αδυναμία εκτέλεσης ακόλουθης εντολής: ';
$PHPMAILER_LANG['file_access'] = 'Αδυναμία προσπέλασης του αρχείου: ';
$PHPMAILER_LANG['file_open'] = 'Σφάλμα Αρχείου: Δεν είναι δυνατό το άνοιγμα του ακόλουθου αρχείου: ';
$PHPMAILER_LANG['from_failed'] = 'Η παρακάτω διεύθυνση αποστολέα δεν είναι σωστή: ';
$PHPMAILER_LANG['instantiate'] = 'Αδυναμία εκκίνησης Mail function.';
$PHPMAILER_LANG['invalid_address'] = 'Το μήνυμα δεν εστάλη, η διεύθυνση δεν είναι έγκυρη: ';
$PHPMAILER_LANG['authenticate'] = 'Σφάλμα SMTP: Αδυναμία πιστοποίησης.';
$PHPMAILER_LANG['buggy_php'] = 'Η έκδοση PHP που χρησιμοποιείτε παρουσιάζει σφάλμα που μπορεί να έχει ως αποτέλεσμα κατεστραμένα μηνύματα. Για να το διορθώσετε, αλλάξτε τον τρόπο αποστολής σε SMTP, απενεργοποιήστε την επιλογή mail.add_x_header στο αρχείο php.ini, αλλάξτε λειτουργικό σε MacOS ή Linux ή αναβαθμίστε την PHP σε έκδοση 7.0.17+ ή 7.1.3+.';
$PHPMAILER_LANG['connect_host'] = 'Σφάλμα SMTP: Αδυναμία σύνδεσης με τον φιλοξενητή SMTP.';
$PHPMAILER_LANG['data_not_accepted'] = 'Σφάλμα SMTP: Μη αποδεκτά δεδομένα.';
$PHPMAILER_LANG['empty_message'] = 'Η ηλεκτρονική επιστολή δεν έχει περιεχόμενο.';
$PHPMAILER_LANG['encoding'] = 'Άγνωστη μορφή κωδικοποίησης: ';
$PHPMAILER_LANG['execute'] = 'Αδυναμία εκτέλεσης: ';
$PHPMAILER_LANG['extension_missing'] = 'Απουσία επέκτασης: ';
$PHPMAILER_LANG['file_access'] = 'Αδυναμία πρόσβασης στο αρχείο: ';
$PHPMAILER_LANG['file_open'] = 'Σφάλμα Αρχείου: Αδυναμία ανοίγματος αρχείου: ';
$PHPMAILER_LANG['from_failed'] = 'Η ακόλουθη διεύθυνση αποστολέα δεν είναι σωστή: ';
$PHPMAILER_LANG['instantiate'] = 'Αδυναμία εκκίνησης συνάρτησης Mail.';
$PHPMAILER_LANG['invalid_address'] = 'Μη έγκυρη διεύθυνση: ';
$PHPMAILER_LANG['invalid_header'] = 'Μη έγκυρο όνομα κεφαλίδας ή τιμή';
$PHPMAILER_LANG['invalid_hostentry'] = 'Μη έγκυρη εισαγωγή φιλοξενητή: ';
$PHPMAILER_LANG['invalid_host'] = 'Μη έγκυρος φιλοξενητής: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer δεν υποστηρίζεται.';
$PHPMAILER_LANG['provide_address'] = 'Παρακαλούμε δώστε τουλάχιστον μια e-mail διεύθυνση παραλήπτη.';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Σφάλμα: Οι παρακάτω διευθύνσεις παραλήπτη δεν είναι έγκυρες: ';
$PHPMAILER_LANG['provide_address'] = 'Δώστε τουλάχιστον μια ηλεκτρονική διεύθυνση παραλήπτη.';
$PHPMAILER_LANG['recipients_failed'] = 'Σφάλμα SMTP: Οι παρακάτω διευθύνσεις παραλήπτη δεν είναι έγκυρες: ';
$PHPMAILER_LANG['signing'] = 'Σφάλμα υπογραφής: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'Αποτυχία σύνδεσης στον SMTP Server.';
$PHPMAILER_LANG['smtp_error'] = 'Σφάλμα από τον SMTP Server: ';
$PHPMAILER_LANG['variable_set'] = 'Αδυναμία ορισμού ή αρχικοποίησης μεταβλητής: ';
//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
$PHPMAILER_LANG['smtp_code'] = 'Κώδικάς SMTP: ';
$PHPMAILER_LANG['smtp_code_ex'] = 'Πρόσθετες πληροφορίες SMTP: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'Αποτυχία σύνδεσης SMTP.';
$PHPMAILER_LANG['smtp_detail'] = 'Λεπτομέρεια: ';
$PHPMAILER_LANG['smtp_error'] = 'Σφάλμα με τον διακομιστή SMTP: ';
$PHPMAILER_LANG['variable_set'] = 'Αδυναμία ορισμού ή επαναφοράς μεταβλητής: ';

View File

@ -1,25 +1,37 @@
<?php
/**
* Esperanto PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
* @author Robin van der Vliet <info@robinvandervliet.com>
*/
$PHPMAILER_LANG['authenticate'] = 'Eraro de servilo SMTP : aŭtentigo malsukcesis.';
$PHPMAILER_LANG['connect_host'] = 'Eraro de servilo SMTP : konektado al servilo malsukcesis.';
$PHPMAILER_LANG['data_not_accepted'] = 'Eraro de servilo SMTP : neĝustaj datumoj.';
$PHPMAILER_LANG['empty_message'] = 'Teksto de mesaĝo mankas.';
$PHPMAILER_LANG['authenticate'] = 'SMTP-eraro: Ne eblis aŭtentigi.';
$PHPMAILER_LANG['buggy_php'] = 'Via versio de PHP estas trafita de cimo, kiu povas kaŭzi difektitajn mesaĝojn. Por ripari tion, ŝanĝu al sendado per SMTP, malŝaltu la opcion mail.add_x_header en via php.ini, ŝanĝu al MacOS aŭ Linux, aŭ ĝisdatigu vian PHP al versio 7.0.17+ aŭ 7.1.3+.';
$PHPMAILER_LANG['connect_host'] = 'SMTP-eraro: Ne eblis konektiĝi al la SMTP-gastiganto.';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP-eraro: Datumoj ne akceptitaj.';
$PHPMAILER_LANG['empty_message'] = 'Mesaĝokorpo malplena';
$PHPMAILER_LANG['encoding'] = 'Nekonata kodoprezento: ';
$PHPMAILER_LANG['execute'] = 'Lanĉi rulumadon ne eblis: ';
$PHPMAILER_LANG['file_access'] = 'Aliro al dosiero ne sukcesis: ';
$PHPMAILER_LANG['file_open'] = 'Eraro de dosiero: malfermo neeblas: ';
$PHPMAILER_LANG['from_failed'] = 'Jena adreso de sendinto malsukcesis: ';
$PHPMAILER_LANG['instantiate'] = 'Genero de retmesaĝa funkcio neeblis.';
$PHPMAILER_LANG['invalid_address'] = 'Retadreso ne validas: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' mesaĝilo ne subtenata.';
$PHPMAILER_LANG['provide_address'] = 'Vi devas tajpi almenaŭ unu recevontan retadreson.';
$PHPMAILER_LANG['recipients_failed'] = 'Eraro de servilo SMTP : la jenaj poŝtrecivuloj kaŭzis eraron: ';
$PHPMAILER_LANG['signing'] = 'Eraro de subskribo: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP konektado malsukcesis.';
$PHPMAILER_LANG['smtp_error'] = 'Eraro de servilo SMTP : ';
$PHPMAILER_LANG['variable_set'] = 'Variablo ne pravalorizeblas aŭ ne repravalorizeblas: ';
$PHPMAILER_LANG['extension_missing'] = 'Mankas etendo: ';
$PHPMAILER_LANG['execute'] = 'Ne eblis plenumi: ';
$PHPMAILER_LANG['extension_missing'] = 'Kromprogramo mankas: ';
$PHPMAILER_LANG['file_access'] = 'Ne eblis aliri la dosieron: ';
$PHPMAILER_LANG['file_open'] = 'Dosiera eraro: Ne eblis malfermi la dosieron: ';
$PHPMAILER_LANG['from_failed'] = 'La sekva(j) sendinto(j) malsukcesis: ';
$PHPMAILER_LANG['instantiate'] = 'Ne eblis funkciigi la retpoŝtan funkcion.';
$PHPMAILER_LANG['invalid_address'] = 'Nevalida adreso: ';
$PHPMAILER_LANG['invalid_header'] = 'Nevalida kaplinia nomo aŭ valoro';
$PHPMAILER_LANG['invalid_hostentry'] = 'Nevalida enigo de gastiganto: ';
$PHPMAILER_LANG['invalid_host'] = 'Nevalida gastiganto: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' retpoŝtilo ne estas subtenata.';
$PHPMAILER_LANG['provide_address'] = 'Vi devas provizi almenaŭ unu retpoŝtadreson de ricevonto.';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP-eraro: La sekva(j) ricevonto(j) malsukcesis: ';
$PHPMAILER_LANG['signing'] = 'Subskriba eraro: ';
$PHPMAILER_LANG['smtp_code'] = 'SMTP-kodo: ';
$PHPMAILER_LANG['smtp_code_ex'] = 'Pliaj SMTP-informoj: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'La SMTP-konektiĝo malsukcesis.';
$PHPMAILER_LANG['smtp_detail'] = 'Informoj: ';
$PHPMAILER_LANG['smtp_error'] = 'Eraro de SMTP-servilo: ';
$PHPMAILER_LANG['variable_set'] = 'Ne eblas agordi aŭ reagordi la variablon: ';
$PHPMAILER_LANG['no_smtputf8'] = 'La servilo ne subtenas SMTPUTF8, kiu estas bezonata por sendi al Unicode-adresoj.';
$PHPMAILER_LANG['imap_recommended'] = 'Uzado de la simpligita adresanalizilo ne estas rekomendita. Instalu la IMAP-kromprogramon por PHP por plena RFC822-analizado.';
$PHPMAILER_LANG['deprecated_argument'] = 'Malrekomendita argumento: ';

View File

@ -1,26 +1,38 @@
<?php
/**
* Spanish PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
* @author Matt Sturdy <matt.sturdy@gmail.com>
* @author Crystopher Glodzienski Cardoso <crystopher.glodzienski@gmail.com>
* @author Daniel Cruz <danicruz0415@gmail.com>
*/
$PHPMAILER_LANG['authenticate'] = 'Error SMTP: Imposible autentificar.';
$PHPMAILER_LANG['buggy_php'] = 'Tu versión de PHP ha sido afectada por un bug que puede resultar en mensajes corruptos. Para arreglarlo, cambia a enviar usando SMTP, deshabilita la opción mail.add_x_header en tu php.ini, cambia a MacOS o Linux, o actualiza tu PHP a la versión 7.0.17+ o 7.1.3+.';
$PHPMAILER_LANG['connect_host'] = 'Error SMTP: Imposible conectar al servidor SMTP.';
$PHPMAILER_LANG['data_not_accepted'] = 'Error SMTP: Datos no aceptados.';
$PHPMAILER_LANG['empty_message'] = 'El cuerpo del mensaje está vacío';
$PHPMAILER_LANG['empty_message'] = 'El cuerpo del mensaje está vacío.';
$PHPMAILER_LANG['encoding'] = 'Codificación desconocida: ';
$PHPMAILER_LANG['execute'] = 'Imposible ejecutar: ';
$PHPMAILER_LANG['extension_missing'] = 'Extensión faltante: ';
$PHPMAILER_LANG['file_access'] = 'Imposible acceder al archivo: ';
$PHPMAILER_LANG['file_open'] = 'Error de Archivo: Imposible abrir el archivo: ';
$PHPMAILER_LANG['from_failed'] = 'La(s) siguiente(s) direcciones de remitente fallaron: ';
$PHPMAILER_LANG['from_failed'] = 'La siguiente dirección de remitente falló: ';
$PHPMAILER_LANG['instantiate'] = 'Imposible crear una instancia de la función Mail.';
$PHPMAILER_LANG['invalid_address'] = 'Imposible enviar: dirección de email inválido: ';
$PHPMAILER_LANG['invalid_header'] = 'Nombre o valor de encabezado no válido';
$PHPMAILER_LANG['invalid_hostentry'] = 'Hostentry inválido: ';
$PHPMAILER_LANG['invalid_host'] = 'Host inválido: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer no está soportado.';
$PHPMAILER_LANG['provide_address'] = 'Debe proporcionar al menos una dirección de email de destino.';
$PHPMAILER_LANG['recipients_failed'] = 'Error SMTP: Los siguientes destinos fallaron: ';
$PHPMAILER_LANG['signing'] = 'Error al firmar: ';
$PHPMAILER_LANG['smtp_code'] = 'Código del servidor SMTP: ';
$PHPMAILER_LANG['smtp_code_ex'] = 'Información adicional del servidor SMTP: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() falló.';
$PHPMAILER_LANG['smtp_detail'] = 'Detalle: ';
$PHPMAILER_LANG['smtp_error'] = 'Error del servidor SMTP: ';
$PHPMAILER_LANG['variable_set'] = 'No se pudo configurar la variable: ';
$PHPMAILER_LANG['extension_missing'] = 'Extensión faltante: ';
$PHPMAILER_LANG['imap_recommended'] = 'No se recomienda usar el analizador de direcciones simplificado. Instala la extensión IMAP de PHP para un análisis RFC822 más completo.';
$PHPMAILER_LANG['deprecated_argument'] = 'Argumento obsoleto: ';

View File

@ -1,4 +1,5 @@
<?php
/**
* Estonian PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer

View File

@ -1,4 +1,5 @@
<?php
/**
* Persian/Farsi PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
@ -24,4 +25,4 @@ $PHPMAILER_LANG['signing'] = 'خطا در امضا: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'خطا در اتصال به SMTP.';
$PHPMAILER_LANG['smtp_error'] = 'خطا در SMTP Server: ';
$PHPMAILER_LANG['variable_set'] = 'امکان ارسال یا ارسال مجدد متغیر‌ها وجود ندارد: ';
//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
$PHPMAILER_LANG['extension_missing'] = 'افزونه موجود نیست: ';

View File

@ -1,4 +1,5 @@
<?php
/**
* Finnish PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
@ -19,7 +20,6 @@ $PHPMAILER_LANG['instantiate'] = 'mail-funktion luonti epäonnistui.';
$PHPMAILER_LANG['mailer_not_supported'] = 'postivälitintyyppiä ei tueta.';
$PHPMAILER_LANG['provide_address'] = 'Aseta vähintään yksi vastaanottajan sähk&ouml;postiosoite.';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP-virhe: seuraava vastaanottaja osoite on virheellinen.';
$PHPMAILER_LANG['encoding'] = 'Tuntematon koodaustyyppi: ';
//$PHPMAILER_LANG['signing'] = 'Signing Error: ';
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';

View File

@ -1,4 +1,5 @@
<?php
/**
* Faroese PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer

View File

@ -1,29 +1,36 @@
<?php
/**
* French PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
* Some French punctuation requires a thin non-breaking space (U+202F) character before it,
* for example before a colon or exclamation mark.
* There is one of these characters between these quotes: ""
* @see http://unicode.org/udhr/n/notes_fra.html
*/
$PHPMAILER_LANG['authenticate'] = 'Erreur SMTP: échec de l\'authentification.';
$PHPMAILER_LANG['authenticate'] = 'Erreur SMTP: échec de lauthentification.';
$PHPMAILER_LANG['buggy_php'] = 'Votre version de PHP est affectée par un bug qui peut entraîner des messages corrompus. Pour résoudre ce problème, passez à lenvoi par SMTP, désactivez loption mail.add_x_header dans le fichier php.ini, passez à MacOS ou Linux, ou passez PHP à la version 7.0.17+ ou 7.1.3+.';
$PHPMAILER_LANG['connect_host'] = 'Erreur SMTP: impossible de se connecter au serveur SMTP.';
$PHPMAILER_LANG['data_not_accepted'] = 'Erreur SMTP: données incorrectes.';
$PHPMAILER_LANG['empty_message'] = 'Corps du message vide.';
$PHPMAILER_LANG['encoding'] = 'Encodage inconnu: ';
$PHPMAILER_LANG['execute'] = 'Impossible de lancer l\'exécution: ';
$PHPMAILER_LANG['file_access'] = 'Impossible d\'accéder au fichier: ';
$PHPMAILER_LANG['execute'] = 'Impossible de lancer lexécution: ';
$PHPMAILER_LANG['extension_missing'] = 'Extension manquante: ';
$PHPMAILER_LANG['file_access'] = 'Impossible daccéder au fichier: ';
$PHPMAILER_LANG['file_open'] = 'Ouverture du fichier impossible: ';
$PHPMAILER_LANG['from_failed'] = 'L\'adresse d\'expéditeur suivante a échoué: ';
$PHPMAILER_LANG['instantiate'] = 'Impossible d\'instancier la fonction mail.';
$PHPMAILER_LANG['invalid_address'] = 'L\'adresse courriel n\'est pas valide: ';
$PHPMAILER_LANG['from_failed'] = 'Ladresse dexpéditeur suivante a échoué: ';
$PHPMAILER_LANG['instantiate'] = 'Impossible dinstancier la fonction mail.';
$PHPMAILER_LANG['invalid_address'] = 'Adresse courriel non valide: ';
$PHPMAILER_LANG['invalid_header'] = 'Nom ou valeur de len-tête non valide';
$PHPMAILER_LANG['invalid_hostentry'] = 'Entrée dhôte non valide: ';
$PHPMAILER_LANG['invalid_host'] = 'Hôte non valide: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' client de messagerie non supporté.';
$PHPMAILER_LANG['provide_address'] = 'Vous devez fournir au moins une adresse de destinataire.';
$PHPMAILER_LANG['recipients_failed'] = 'Erreur SMTP: les destinataires suivants sont en erreur: ';
$PHPMAILER_LANG['recipients_failed'] = 'Erreur SMTP:les destinataires suivants ont échoué: ';
$PHPMAILER_LANG['signing'] = 'Erreur de signature: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'Échec de la connexion SMTP.';
$PHPMAILER_LANG['smtp_code'] = 'Code SMTP: ';
$PHPMAILER_LANG['smtp_code_ex'] = 'Informations supplémentaires SMTP: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'La fonction SMTP connect() a échoué.';
$PHPMAILER_LANG['smtp_detail'] = 'Détails: ';
$PHPMAILER_LANG['smtp_error'] = 'Erreur du serveur SMTP: ';
$PHPMAILER_LANG['variable_set'] = 'Impossible d\'initialiser ou de réinitialiser une variable: ';
$PHPMAILER_LANG['extension_missing'] = 'Extension manquante: ';
$PHPMAILER_LANG['variable_set'] = 'Impossible dinitialiser ou de réinitialiser une variable: ';

View File

@ -1,4 +1,5 @@
<?php
/**
* Galician PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer

View File

@ -1,4 +1,5 @@
<?php
/**
* Hebrew PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer

View File

@ -0,0 +1,35 @@
<?php
/**
* Hindi PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
* @author Yash Karanke <mr.karanke@gmail.com>
* Rewrite and extension of the work by Jayanti Suthar <suthar.jayanti93@gmail.com>
*/
$PHPMAILER_LANG['authenticate'] = 'SMTP त्रुटि: प्रामाणिकता की जांच नहीं हो सका। ';
$PHPMAILER_LANG['buggy_php'] = 'PHP का आपका संस्करण एक बग से प्रभावित है जिसके परिणामस्वरूप संदेश दूषित हो सकते हैं. इसे ठीक करने हेतु, भेजने के लिए SMTP का उपयोग करे, अपने php.ini में mail.add_x_header विकल्प को अक्षम करें, MacOS या Linux पर जाए, या अपने PHP संस्करण को 7.0.17+ या 7.1.3+ बदले.';
$PHPMAILER_LANG['connect_host'] = 'SMTP त्रुटि: SMTP सर्वर से कनेक्ट नहीं हो सका। ';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP त्रुटि: डेटा स्वीकार नहीं किया जाता है। ';
$PHPMAILER_LANG['empty_message'] = 'संदेश खाली है। ';
$PHPMAILER_LANG['encoding'] = 'अज्ञात एन्कोडिंग प्रकार। ';
$PHPMAILER_LANG['execute'] = 'आदेश को निष्पादित करने में विफल। ';
$PHPMAILER_LANG['extension_missing'] = 'एक्सटेन्षन गायब है: ';
$PHPMAILER_LANG['file_access'] = 'फ़ाइल उपलब्ध नहीं है। ';
$PHPMAILER_LANG['file_open'] = 'फ़ाइल त्रुटि: फाइल को खोला नहीं जा सका। ';
$PHPMAILER_LANG['from_failed'] = 'प्रेषक का पता गलत है। ';
$PHPMAILER_LANG['instantiate'] = 'मेल फ़ंक्शन कॉल नहीं कर सकता है।';
$PHPMAILER_LANG['invalid_address'] = 'पता गलत है। ';
$PHPMAILER_LANG['invalid_header'] = 'अमान्य हेडर नाम या मान';
$PHPMAILER_LANG['invalid_hostentry'] = 'अमान्य hostentry: ';
$PHPMAILER_LANG['invalid_host'] = 'अमान्य होस्ट: ';
$PHPMAILER_LANG['mailer_not_supported'] = 'मेल सर्वर के साथ काम नहीं करता है। ';
$PHPMAILER_LANG['provide_address'] = 'आपको कम से कम एक प्राप्तकर्ता का ई-मेल पता प्रदान करना होगा।';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP त्रुटि: निम्न प्राप्तकर्ताओं को पते भेजने में विफल। ';
$PHPMAILER_LANG['signing'] = 'साइनअप त्रुटि: ';
$PHPMAILER_LANG['smtp_code'] = 'SMTP कोड: ';
$PHPMAILER_LANG['smtp_code_ex'] = 'अतिरिक्त SMTP जानकारी: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP का connect () फ़ंक्शन विफल हुआ। ';
$PHPMAILER_LANG['smtp_detail'] = 'विवरण: ';
$PHPMAILER_LANG['smtp_error'] = 'SMTP सर्वर त्रुटि। ';
$PHPMAILER_LANG['variable_set'] = 'चर को बना या संशोधित नहीं किया जा सकता। ';

View File

@ -1,4 +1,5 @@
<?php
/**
* Croatian PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer

View File

@ -1,4 +1,5 @@
<?php
/**
* Hungarian PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
@ -23,4 +24,4 @@ $PHPMAILER_LANG['signing'] = 'Hibás aláírás: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'Hiba az SMTP-kapcsolatban.';
$PHPMAILER_LANG['smtp_error'] = 'SMTP-szerver hiba: ';
$PHPMAILER_LANG['variable_set'] = 'A következő változók beállítása nem sikerült: ';
//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
$PHPMAILER_LANG['extension_missing'] = 'Bővítmény hiányzik: ';

View File

@ -1,10 +1,11 @@
<?php
/**
* Armenian PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
* @author Hrayr Grigoryan <hrayr@bits.am>
*/
$PHPMAILER_LANG['authenticate'] = 'SMTP -ի սխալ: չհաջողվեց ստուգել իսկությունը.';
$PHPMAILER_LANG['connect_host'] = 'SMTP -ի սխալ: չհաջողվեց կապ հաստատել SMTP սերվերի հետ.';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP -ի սխալ: տվյալները ընդունված չեն.';

View File

@ -1,27 +1,31 @@
<?php
/**
* Indonesian PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
* @author Cecep Prawiro <cecep.prawiro@gmail.com>
* @author @januridp
* @author Ian Mustafa <mail@ianmustafa.com>
*/
$PHPMAILER_LANG['authenticate'] = 'Kesalahan SMTP: Tidak dapat mengotentikasi.';
$PHPMAILER_LANG['connect_host'] = 'Kesalahan SMTP: Tidak dapat terhubung ke host SMTP.';
$PHPMAILER_LANG['data_not_accepted'] = 'Kesalahan SMTP: Data tidak diterima peladen.';
$PHPMAILER_LANG['data_not_accepted'] = 'Kesalahan SMTP: Data tidak diterima.';
$PHPMAILER_LANG['empty_message'] = 'Isi pesan kosong';
$PHPMAILER_LANG['encoding'] = 'Pengkodean karakter tidak dikenali: ';
$PHPMAILER_LANG['execute'] = 'Tidak dapat menjalankan proses : ';
$PHPMAILER_LANG['file_access'] = 'Tidak dapat mengakses berkas : ';
$PHPMAILER_LANG['file_open'] = 'Kesalahan File: Berkas tidak bisa dibuka : ';
$PHPMAILER_LANG['from_failed'] = 'Alamat pengirim berikut mengakibatkan kesalahan : ';
$PHPMAILER_LANG['instantiate'] = 'Tidak dapat menginisialisasi fungsi surel';
$PHPMAILER_LANG['invalid_address'] = 'Gagal terkirim, alamat surel tidak benar : ';
$PHPMAILER_LANG['provide_address'] = 'Harus disediakan minimal satu alamat tujuan';
$PHPMAILER_LANG['mailer_not_supported'] = 'Pengirim tidak didukung';
$PHPMAILER_LANG['recipients_failed'] = 'Kesalahan SMTP: Alamat tujuan berikut menghasilkan kesalahan : ';
$PHPMAILER_LANG['signing'] = 'Kesalahan dalam tanda tangan : ';
$PHPMAILER_LANG['execute'] = 'Tidak dapat menjalankan proses: ';
$PHPMAILER_LANG['file_access'] = 'Tidak dapat mengakses berkas: ';
$PHPMAILER_LANG['file_open'] = 'Kesalahan Berkas: Berkas tidak dapat dibuka: ';
$PHPMAILER_LANG['from_failed'] = 'Alamat pengirim berikut mengakibatkan kesalahan: ';
$PHPMAILER_LANG['instantiate'] = 'Tidak dapat menginisialisasi fungsi surel.';
$PHPMAILER_LANG['invalid_address'] = 'Gagal terkirim, alamat surel tidak sesuai: ';
$PHPMAILER_LANG['invalid_hostentry'] = 'Gagal terkirim, entri host tidak sesuai: ';
$PHPMAILER_LANG['invalid_host'] = 'Gagal terkirim, host tidak sesuai: ';
$PHPMAILER_LANG['provide_address'] = 'Harus tersedia minimal satu alamat tujuan';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer tidak didukung';
$PHPMAILER_LANG['recipients_failed'] = 'Kesalahan SMTP: Alamat tujuan berikut menyebabkan kesalahan: ';
$PHPMAILER_LANG['signing'] = 'Kesalahan dalam penandatangan SSL: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() gagal.';
$PHPMAILER_LANG['smtp_error'] = 'Kesalahan pada pelayan SMTP : ';
$PHPMAILER_LANG['variable_set'] = 'Tidak berhasil mengatur atau mengatur ulang variable : ';
$PHPMAILER_LANG['extension_missing'] = 'Ekstensi hilang: ';
$PHPMAILER_LANG['smtp_error'] = 'Kesalahan pada pelayan SMTP: ';
$PHPMAILER_LANG['variable_set'] = 'Tidak dapat mengatur atau mengatur ulang variabel: ';
$PHPMAILER_LANG['extension_missing'] = 'Ekstensi PHP tidak tersedia: ';

View File

@ -1,4 +1,5 @@
<?php
/**
* Italian PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
@ -24,4 +25,4 @@ $PHPMAILER_LANG['signing'] = 'Errore nella firma: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() fallita.';
$PHPMAILER_LANG['smtp_error'] = 'Errore del server SMTP: ';
$PHPMAILER_LANG['variable_set'] = 'Impossibile impostare o resettare la variabile: ';
//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
$PHPMAILER_LANG['extension_missing'] = 'Estensione mancante: ';

View File

@ -1,27 +1,37 @@
<?php
/**
* Japanese PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
* @author Mitsuhiro Yoshida <http://mitstek.com/>
* @author Mitsuhiro Yoshida <https://mitstek.com>
* @author Yoshi Sakai <http://bluemooninc.jp/>
* @author Arisophy <https://github.com/arisophy/>
* @author ARAKI Musashi <https://github.com/arakim/>
*/
$PHPMAILER_LANG['authenticate'] = 'SMTPエラー: 認証できませんでした。';
$PHPMAILER_LANG['buggy_php'] = 'ご利用のバージョンのPHPには不具合があり、メッセージが破損するおそれがあります。問題の解決は以下のいずれかを行ってください。SMTPでの送信に切り替える。php.iniのmail.add_x_headerをoffにする。MacOSまたはLinuxに切り替える。PHPバージョン7.0.17以降または7.1.3以降にアップグレードする。';
$PHPMAILER_LANG['connect_host'] = 'SMTPエラー: SMTPホストに接続できませんでした。';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTPエラー: データが受け付けられませんでした。';
//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
$PHPMAILER_LANG['empty_message'] = 'メール本文が空です。';
$PHPMAILER_LANG['encoding'] = '不明なエンコーディング: ';
$PHPMAILER_LANG['execute'] = '実行できませんでした: ';
$PHPMAILER_LANG['extension_missing'] = '拡張機能が見つかりません: ';
$PHPMAILER_LANG['file_access'] = 'ファイルにアクセスできません: ';
$PHPMAILER_LANG['file_open'] = 'ファイルエラー: ファイルを開けません: ';
$PHPMAILER_LANG['from_failed'] = 'Fromアドレスを登録する際にエラーが発生しました: ';
$PHPMAILER_LANG['instantiate'] = 'メール関数が正常に動作しませんでした。';
//$PHPMAILER_LANG['invalid_address'] = 'Invalid address: ';
$PHPMAILER_LANG['provide_address'] = '少なくとも1つメールアドレスを 指定する必要があります。';
$PHPMAILER_LANG['invalid_address'] = '不正なメールアドレス: ';
$PHPMAILER_LANG['invalid_header'] = '不正なヘッダー名またはその内容';
$PHPMAILER_LANG['invalid_hostentry'] = '不正なホストエントリー: ';
$PHPMAILER_LANG['invalid_host'] = '不正なホスト: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' メーラーがサポートされていません。';
$PHPMAILER_LANG['provide_address'] = '少なくとも1つメールアドレスを 指定する必要があります。';
$PHPMAILER_LANG['recipients_failed'] = 'SMTPエラー: 次の受信者アドレスに 間違いがあります: ';
//$PHPMAILER_LANG['signing'] = 'Signing Error: ';
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
$PHPMAILER_LANG['signing'] = '署名エラー: ';
$PHPMAILER_LANG['smtp_code'] = 'SMTPコード: ';
$PHPMAILER_LANG['smtp_code_ex'] = 'SMTP追加情報: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP接続に失敗しました。';
$PHPMAILER_LANG['smtp_detail'] = '詳細: ';
$PHPMAILER_LANG['smtp_error'] = 'SMTPサーバーエラー: ';
$PHPMAILER_LANG['variable_set'] = '変数が存在しません: ';

View File

@ -1,4 +1,5 @@
<?php
/**
* Georgian PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer

View File

@ -1,4 +1,5 @@
<?php
/**
* Korean PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer

View File

@ -0,0 +1,27 @@
<?php
/**
* Kurdish (Sorani) PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
* @author Halo Salman <halo@home4t.com>
*/
$PHPMAILER_LANG['authenticate'] = 'هەڵەی SMTP : نەتوانرا کۆدەکە پشتڕاست بکرێتەوە ';
$PHPMAILER_LANG['connect_host'] = 'هەڵەی SMTP: نەتوانرا پەیوەندی بە سێرڤەرەوە بکات SMTP.';
$PHPMAILER_LANG['data_not_accepted'] = 'هەڵەی SMTP: ئەو زانیاریانە قبوڵ نەکرا.';
$PHPMAILER_LANG['empty_message'] = 'پەیامەکە بەتاڵە';
$PHPMAILER_LANG['encoding'] = 'کۆدکردنی نەزانراو : ';
$PHPMAILER_LANG['execute'] = 'ناتوانرێت جێبەجێ بکرێت: ';
$PHPMAILER_LANG['file_access'] = 'ناتوانرێت دەستت بگات بە فایلەکە: ';
$PHPMAILER_LANG['file_open'] = 'هەڵەی پەڕگە(فایل): ناتوانرێت بکرێتەوە: ';
$PHPMAILER_LANG['from_failed'] = 'هەڵە لە ئاستی ناونیشانی نێرەر: ';
$PHPMAILER_LANG['instantiate'] = 'ناتوانرێت خزمەتگوزاری پۆستە پێشکەش بکرێت.';
$PHPMAILER_LANG['invalid_address'] = 'نەتوانرا بنێردرێت ، چونکە ناونیشانی ئیمەیڵەکە نادروستە: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' مەیلەر پشتگیری ناکات';
$PHPMAILER_LANG['provide_address'] = 'دەبێت ناونیشانی ئیمەیڵی لانیکەم یەک وەرگر دابین بکرێت.';
$PHPMAILER_LANG['recipients_failed'] = ' هەڵەی SMTP: ئەم هەڵانەی خوارەوەشکستی هێنا لە ناردن بۆ هەردووکیان: ';
$PHPMAILER_LANG['signing'] = 'هەڵەی واژۆ: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect()پەیوەندی شکستی هێنا .';
$PHPMAILER_LANG['smtp_error'] = 'هەڵەی ئاستی سێرڤەری SMTP: ';
$PHPMAILER_LANG['variable_set'] = 'ناتوانرێت بیگۆڕیت یان دوبارە بینێریتەوە: ';
$PHPMAILER_LANG['extension_missing'] = 'درێژکراوە نەماوە: ';

View File

@ -1,4 +1,5 @@
<?php
/**
* Lithuanian PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer

View File

@ -1,4 +1,5 @@
<?php
/**
* Latvian PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer

View File

@ -0,0 +1,27 @@
<?php
/**
* Malagasy PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
* @author Hackinet <piyushjha8164@gmail.com>
*/
$PHPMAILER_LANG['authenticate'] = 'Hadisoana SMTP: Tsy nahomby ny fanamarinana.';
$PHPMAILER_LANG['connect_host'] = 'SMTP Error: Tsy afaka mampifandray amin\'ny mpampiantrano SMTP.';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP diso: tsy voarakitra ny angona.';
$PHPMAILER_LANG['empty_message'] = 'Tsy misy ny votoaty mailaka.';
$PHPMAILER_LANG['encoding'] = 'Tsy fantatra encoding: ';
$PHPMAILER_LANG['execute'] = 'Tsy afaka manatanteraka ity baiko manaraka ity: ';
$PHPMAILER_LANG['file_access'] = 'Tsy nahomby ny fidirana amin\'ity rakitra ity: ';
$PHPMAILER_LANG['file_open'] = 'Hadisoana diso: Tsy afaka nanokatra ity file manaraka ity: ';
$PHPMAILER_LANG['from_failed'] = 'Ny adiresy iraka manaraka dia diso: ';
$PHPMAILER_LANG['instantiate'] = 'Tsy afaka nanomboka ny hetsika mail.';
$PHPMAILER_LANG['invalid_address'] = 'Tsy mety ny adiresy: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer tsy manohana.';
$PHPMAILER_LANG['provide_address'] = 'Alefaso azafady iray adiresy iray farafahakeliny.';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Error: Tsy mety ireo mpanaraka ireto: ';
$PHPMAILER_LANG['signing'] = 'Error nandritra ny sonia:';
$PHPMAILER_LANG['smtp_connect_failed'] = 'Tsy nahomby ny fifandraisana tamin\'ny server SMTP.';
$PHPMAILER_LANG['smtp_error'] = 'Fahadisoana tamin\'ny server SMTP: ';
$PHPMAILER_LANG['variable_set'] = 'Tsy azo atao ny mametraka na mamerina ny variable: ';
$PHPMAILER_LANG['extension_missing'] = 'Tsy hita ny ampahany: ';

View File

@ -0,0 +1,27 @@
<?php
/**
* Mongolian PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
* @author @wispas
*/
$PHPMAILER_LANG['authenticate'] = 'Алдаа SMTP: Холбогдож чадсангүй.';
$PHPMAILER_LANG['connect_host'] = 'Алдаа SMTP: SMTP- сервертэй холбогдож болохгүй байна.';
$PHPMAILER_LANG['data_not_accepted'] = 'Алдаа SMTP: зөвшөөрөгдсөнгүй.';
$PHPMAILER_LANG['encoding'] = 'Тодорхойгүй кодчилол: ';
$PHPMAILER_LANG['execute'] = 'Коммандыг гүйцэтгэх боломжгүй байна: ';
$PHPMAILER_LANG['file_access'] = 'Файлд хандах боломжгүй байна: ';
$PHPMAILER_LANG['file_open'] = 'Файлын алдаа: файлыг нээх боломжгүй байна: ';
$PHPMAILER_LANG['from_failed'] = 'Илгээгчийн хаяг буруу байна: ';
$PHPMAILER_LANG['instantiate'] = 'Mail () функцийг ажиллуулах боломжгүй байна.';
$PHPMAILER_LANG['provide_address'] = 'Хүлээн авагчийн имэйл хаягийг оруулна уу.';
$PHPMAILER_LANG['mailer_not_supported'] = ' — мэйл серверийг дэмжсэнгүй.';
$PHPMAILER_LANG['recipients_failed'] = 'Алдаа SMTP: ийм хаягийг илгээж чадсангүй: ';
$PHPMAILER_LANG['empty_message'] = 'Хоосон мессэж';
$PHPMAILER_LANG['invalid_address'] = 'И-Мэйл буруу форматтай тул илгээх боломжгүй: ';
$PHPMAILER_LANG['signing'] = 'Гарын үсгийн алдаа: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP сервертэй холбогдоход алдаа гарлаа';
$PHPMAILER_LANG['smtp_error'] = 'SMTP серверийн алдаа: ';
$PHPMAILER_LANG['variable_set'] = 'Хувьсагчийг тохируулах эсвэл дахин тохируулах боломжгүй байна: ';
$PHPMAILER_LANG['extension_missing'] = 'Өргөтгөл байхгүй: ';

View File

@ -1,4 +1,5 @@
<?php
/**
* Malaysian PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
@ -23,4 +24,4 @@ $PHPMAILER_LANG['signing'] = 'Ralat pada tanda tangan: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() telah gagal.';
$PHPMAILER_LANG['smtp_error'] = 'Ralat pada pelayan SMTP: ';
$PHPMAILER_LANG['variable_set'] = 'Tidak boleh menetapkan atau menetapkan semula pembolehubah: ';
//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
$PHPMAILER_LANG['extension_missing'] = 'Sambungan hilang: ';

View File

@ -1,25 +1,37 @@
<?php
/**
* Norwegian Bokmål PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
* @author Wera AS <wordpress@wera.no>
*/
$PHPMAILER_LANG['authenticate'] = 'SMTP Feil: Kunne ikke autentisere.';
$PHPMAILER_LANG['connect_host'] = 'SMTP Feil: Kunne ikke koble til SMTP tjener.';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Feil: Datainnhold ikke akseptert.';
$PHPMAILER_LANG['empty_message'] = 'Melding kropp tomt';
$PHPMAILER_LANG['encoding'] = 'Ukjent koding: ';
$PHPMAILER_LANG['execute'] = 'Kunne ikke utføre: ';
$PHPMAILER_LANG['file_access'] = 'Får ikke tilgang til filen: ';
$PHPMAILER_LANG['file_open'] = 'Fil Feil: Kunne ikke åpne filen: ';
$PHPMAILER_LANG['from_failed'] = 'Følgende Frå adresse feilet: ';
$PHPMAILER_LANG['instantiate'] = 'Kunne ikke initialisere post funksjon.';
$PHPMAILER_LANG['invalid_address'] = 'Ugyldig adresse: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' sender er ikke støttet.';
$PHPMAILER_LANG['provide_address'] = 'Du må opppgi minst en mottakeradresse.';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Feil: Følgende mottakeradresse feilet: ';
$PHPMAILER_LANG['signing'] = 'Signering Feil: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP connect() feilet.';
$PHPMAILER_LANG['smtp_error'] = 'SMTP server feil: ';
$PHPMAILER_LANG['variable_set'] = 'Kan ikke skrive eller omskrive variabel: ';
$PHPMAILER_LANG['extension_missing'] = 'Utvidelse mangler: ';
$PHPMAILER_LANG['authenticate'] = 'SMTP-feil: Kunne ikke autentisere.';
$PHPMAILER_LANG['buggy_php'] = 'Din versjon av PHP er påvirket av en feil som kan føre til ødelagte meldinger. For å løse problemet kan du bytte til sending via SMTP, deaktivere mail.add_x_header-alternativet i php.ini, bytte til MacOS eller Linux, eller oppgradere PHP til versjon 7.0.17+ eller 7.1.3+.';
$PHPMAILER_LANG['connect_host'] = 'SMTP-feil: Kunne ikke koble til SMTP-vert.';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP-feil: data ikke akseptert.';
$PHPMAILER_LANG['empty_message'] = 'Meldingsinnholdet er tomt';
$PHPMAILER_LANG['encoding'] = 'Ukjent koding: ';
$PHPMAILER_LANG['execute'] = 'Kunne ikke utføres: ';
$PHPMAILER_LANG['extension_missing'] = 'Utvidelse mangler: ';
$PHPMAILER_LANG['file_access'] = 'Kunne ikke få tilgang til filen: ';
$PHPMAILER_LANG['file_open'] = 'Feil i fil: Kunne ikke åpne filen: ';
$PHPMAILER_LANG['from_failed'] = 'Følgende avsenderadresse mislyktes: ';
$PHPMAILER_LANG['instantiate'] = 'Kunne ikke starte e-postfunksjonen.';
$PHPMAILER_LANG['invalid_address'] = 'Ugyldig adresse: ';
$PHPMAILER_LANG['invalid_header'] = 'Ugyldig headernavn eller verdi';
$PHPMAILER_LANG['invalid_hostentry'] = 'Ugyldig vertsinngang: ';
$PHPMAILER_LANG['invalid_host'] = 'Ugyldig vert: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' sender er ikke støttet.';
$PHPMAILER_LANG['provide_address'] = 'Du må oppgi minst én mottaker-e-postadresse.';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Feil: Følgende mottakeradresse feilet: ';
$PHPMAILER_LANG['signing'] = 'Signeringsfeil: ';
$PHPMAILER_LANG['smtp_code'] = 'SMTP-kode: ';
$PHPMAILER_LANG['smtp_code_ex'] = 'Ytterligere SMTP-info: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP connect() mislyktes.';
$PHPMAILER_LANG['smtp_detail'] = 'Detaljer: ';
$PHPMAILER_LANG['smtp_error'] = 'SMTP-serverfeil: ';
$PHPMAILER_LANG['variable_set'] = 'Kan ikke angi eller tilbakestille variabel: ';
$PHPMAILER_LANG['no_smtputf8'] = 'Serveren støtter ikke SMTPUTF8, som er nødvendig for å sende til Unicode-adresser.';
$PHPMAILER_LANG['imap_recommended'] = 'Det anbefales ikke å bruke forenklet adresseanalyse. Installer PHP IMAP-utvidelsen for full RFC822-analyse.';
$PHPMAILER_LANG['deprecated_argument'] = 'Avviklet argument: ';

View File

@ -1,26 +1,38 @@
<?php
/**
* Dutch PHPMailer language file: refer to PHPMailer.php for definitive list.
* @package PHPMailer
* @author Tuxion <team@tuxion.nl>
* @author Robin van der Vliet <info@robinvandervliet.com>
*/
$PHPMAILER_LANG['authenticate'] = 'SMTP-fout: authenticatie mislukt.';
$PHPMAILER_LANG['buggy_php'] = 'PHP-versie gedetecteerd die onderhevig is aan een bug die kan resulteren in gecorrumpeerde berichten. Om dit te voorkomen, gebruik SMTP voor het verzenden van berichten, zet de optie mail.add_x_header in uw php.ini uit, gebruik MacOS of Linux, of pas de gebruikte PHP-versie aan naar versie 7.0.17+ or 7.1.3+.';
$PHPMAILER_LANG['connect_host'] = 'SMTP-fout: kon niet verbinden met SMTP-host.';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP-fout: data niet geaccepteerd.';
$PHPMAILER_LANG['empty_message'] = 'Berichttekst is leeg';
$PHPMAILER_LANG['encoding'] = 'Onbekende codering: ';
$PHPMAILER_LANG['execute'] = 'Kon niet uitvoeren: ';
$PHPMAILER_LANG['extension_missing'] = 'Extensie afwezig: ';
$PHPMAILER_LANG['file_access'] = 'Kreeg geen toegang tot bestand: ';
$PHPMAILER_LANG['file_open'] = 'Bestandsfout: kon bestand niet openen: ';
$PHPMAILER_LANG['from_failed'] = 'Het volgende afzendersadres is mislukt: ';
$PHPMAILER_LANG['from_failed'] = 'Het volgende afzenderadres is mislukt: ';
$PHPMAILER_LANG['instantiate'] = 'Kon mailfunctie niet initialiseren.';
$PHPMAILER_LANG['invalid_address'] = 'Ongeldig adres: ';
$PHPMAILER_LANG['invalid_header'] = 'Ongeldige headernaam of -waarde';
$PHPMAILER_LANG['invalid_hostentry'] = 'Ongeldige hostentry: ';
$PHPMAILER_LANG['invalid_host'] = 'Ongeldige host: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer wordt niet ondersteund.';
$PHPMAILER_LANG['provide_address'] = 'Er moet minstens één ontvanger worden opgegeven.';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP-fout: de volgende ontvangers zijn mislukt: ';
$PHPMAILER_LANG['signing'] = 'Signeerfout: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Verbinding mislukt.';
$PHPMAILER_LANG['smtp_code'] = 'SMTP-code: ';
$PHPMAILER_LANG['smtp_code_ex'] = 'Aanvullende SMTP-informatie: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP-verbinding mislukt.';
$PHPMAILER_LANG['smtp_detail'] = 'Detail: ';
$PHPMAILER_LANG['smtp_error'] = 'SMTP-serverfout: ';
$PHPMAILER_LANG['variable_set'] = 'Kan de volgende variabele niet instellen of resetten: ';
//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
$PHPMAILER_LANG['variable_set'] = 'Kan de volgende variabele niet instellen of herstellen: ';
$PHPMAILER_LANG['no_smtputf8'] = 'De server ondersteunt geen SMTPUTF8 dat nodig is om naar Unicode-adressen te sturen.';
$PHPMAILER_LANG['imap_recommended'] = 'Het gebruik van de vereenvoudigde adresparser is niet aanbevolen. Installeer de IMAP-extensie voor PHP voor volledige RFC822-ondersteuning.';
$PHPMAILER_LANG['deprecated_argument'] = 'Verouderd argument: ';

View File

@ -1,26 +1,33 @@
<?php
/**
* Polish PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
*/
$PHPMAILER_LANG['authenticate'] = 'Błąd SMTP: Nie można przeprowadzić uwierzytelnienia.';
$PHPMAILER_LANG['connect_host'] = 'Błąd SMTP: Nie można połączyć się z wybranym hostem.';
$PHPMAILER_LANG['data_not_accepted'] = 'Błąd SMTP: Dane nie zostały przyjęte.';
$PHPMAILER_LANG['empty_message'] = 'Wiadomość jest pusta.';
$PHPMAILER_LANG['encoding'] = 'Nieznany sposób kodowania znaków: ';
$PHPMAILER_LANG['execute'] = 'Nie można uruchomić: ';
$PHPMAILER_LANG['authenticate'] = 'Błąd SMTP: nie udało się przeprowadzić uwierzytelnienia.';
$PHPMAILER_LANG['buggy_php'] = 'Używana wersja PHP zawiera błąd, który może powodować uszkodzenie wiadomości. Aby temu zapobiec, użyj wysyłki przez SMTP, wyłącz opcję mail.add_x_header w php.ini, przejdź na macOS lub Linux, lub zaktualizuj PHP do wersji 7.0.17+ albo 7.1.3+.';
$PHPMAILER_LANG['connect_host'] = 'Błąd SMTP: nie udało się połączyć z serwerem (hostem).';
$PHPMAILER_LANG['data_not_accepted'] = 'Błąd SMTP: dane wiadomości nie zostały przyjęte przez serwer.';
$PHPMAILER_LANG['empty_message'] = 'Nie można wysłać pustej wiadomości.';
$PHPMAILER_LANG['encoding'] = 'Nieobsługiwane kodowanie znaków: ';
$PHPMAILER_LANG['execute'] = 'Nie udało się uruchomić polecenia: ';
$PHPMAILER_LANG['extension_missing'] = 'Brak wymaganego rozszerzenia PHP: ';
$PHPMAILER_LANG['file_access'] = 'Brak dostępu do pliku: ';
$PHPMAILER_LANG['file_open'] = 'Nie można otworzyć pliku: ';
$PHPMAILER_LANG['from_failed'] = 'Następujący adres Nadawcy jest nieprawidłowy: ';
$PHPMAILER_LANG['instantiate'] = 'Nie można wywołać funkcji mail(). Sprawdź konfigurację serwera.';
$PHPMAILER_LANG['invalid_address'] = 'Nie można wysłać wiadomości, '.
'następujący adres Odbiorcy jest nieprawidłowy: ';
$PHPMAILER_LANG['provide_address'] = 'Należy podać prawidłowy adres email Odbiorcy.';
$PHPMAILER_LANG['file_open'] = 'Nie udało się otworzyć pliku: ';
$PHPMAILER_LANG['from_failed'] = 'Nieprawidłowy adres nadawcy: ';
$PHPMAILER_LANG['instantiate'] = 'Nie można zainicjować funkcji mail(). Sprawdź konfigurację serwera.';
$PHPMAILER_LANG['invalid_address'] = 'Nie można wysłać wiadomości. Nieprawidłowy adres odbiorcy: ';
$PHPMAILER_LANG['invalid_header'] = 'Nieprawidłowa nazwa lub wartość nagłówka.';
$PHPMAILER_LANG['invalid_hostentry'] = 'Nieprawidłowy wpis hosta: ';
$PHPMAILER_LANG['invalid_host'] = 'Nieprawidłowa nazwa hosta: ';
$PHPMAILER_LANG['provide_address'] = 'Musisz podać co najmniej jeden prawidłowy adres e-mail odbiorcy.';
$PHPMAILER_LANG['mailer_not_supported'] = 'Wybrana metoda wysyłki wiadomości nie jest obsługiwana.';
$PHPMAILER_LANG['recipients_failed'] = 'Błąd SMTP: Następujący odbiorcy są nieprawidłowi: ';
$PHPMAILER_LANG['signing'] = 'Błąd podpisywania wiadomości: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() zakończone niepowodzeniem.';
$PHPMAILER_LANG['smtp_error'] = 'Błąd SMTP: ';
$PHPMAILER_LANG['recipients_failed'] = 'Błąd SMTP: nie udało się wysłać do następujących odbiorców: ';
$PHPMAILER_LANG['signing'] = 'Błąd podpisywania wiadomości cyfrowo: ';
$PHPMAILER_LANG['smtp_code'] = 'Kod odpowiedzi SMTP: ';
$PHPMAILER_LANG['smtp_code_ex'] = 'Dodatkowe informacje serwera SMTP: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'Nie udało się nawiązać połączenia za pomocą SMTP Connect().';
$PHPMAILER_LANG['smtp_detail'] = 'Szczegóły błędu: ';
$PHPMAILER_LANG['smtp_error'] = 'Błąd serwera SMTP: ';
$PHPMAILER_LANG['variable_set'] = 'Nie można ustawić lub zmodyfikować zmiennej: ';
$PHPMAILER_LANG['extension_missing'] = 'Brakujące rozszerzenie: ';

View File

@ -1,26 +1,34 @@
<?php
/**
* Portuguese (European) PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
* @author Jonadabe <jonadabe@hotmail.com>
* @author João Vieira <mail@joaovieira.eu>
*/
$PHPMAILER_LANG['authenticate'] = 'Erro do SMTP: Não foi possível realizar a autenticação.';
$PHPMAILER_LANG['connect_host'] = 'Erro do SMTP: Não foi possível realizar ligação com o servidor SMTP.';
$PHPMAILER_LANG['data_not_accepted'] = 'Erro do SMTP: Os dados foram rejeitados.';
$PHPMAILER_LANG['empty_message'] = 'A mensagem no e-mail está vazia.';
$PHPMAILER_LANG['authenticate'] = 'Erro SMTP: Falha na autenticação.';
$PHPMAILER_LANG['buggy_php'] = 'A sua versão do PHP tem um bug que pode causar mensagens corrompidas. Para resolver, utilize o envio por SMTP, desative a opção mail.add_x_header no ficheiro php.ini, mude para MacOS ou Linux, ou atualize o PHP para a versão 7.0.17+ ou 7.1.3+.';
$PHPMAILER_LANG['connect_host'] = 'Erro SMTP: Não foi possível ligar ao servidor SMTP.';
$PHPMAILER_LANG['data_not_accepted'] = 'Erro SMTP: Dados não aceites.';
$PHPMAILER_LANG['empty_message'] = 'A mensagem de e-mail está vazia.';
$PHPMAILER_LANG['encoding'] = 'Codificação desconhecida: ';
$PHPMAILER_LANG['execute'] = 'Não foi possível executar: ';
$PHPMAILER_LANG['file_access'] = 'Não foi possível aceder o ficheiro: ';
$PHPMAILER_LANG['file_open'] = 'Abertura do ficheiro: Não foi possível abrir o ficheiro: ';
$PHPMAILER_LANG['from_failed'] = 'Ocorreram falhas nos endereços dos seguintes remententes: ';
$PHPMAILER_LANG['instantiate'] = 'Não foi possível iniciar uma instância da função mail.';
$PHPMAILER_LANG['invalid_address'] = 'Não foi enviado nenhum e-mail para o endereço de e-mail inválido: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer não é suportado.';
$PHPMAILER_LANG['provide_address'] = 'Tem de fornecer pelo menos um endereço como destinatário do e-mail.';
$PHPMAILER_LANG['recipients_failed'] = 'Erro do SMTP: O endereço do seguinte destinatário falhou: ';
$PHPMAILER_LANG['signing'] = 'Erro ao assinar: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() falhou.';
$PHPMAILER_LANG['smtp_error'] = 'Erro de servidor SMTP: ';
$PHPMAILER_LANG['variable_set'] = 'Não foi possível definir ou redefinir a variável: ';
$PHPMAILER_LANG['extension_missing'] = 'Extensão em falta: ';
$PHPMAILER_LANG['file_access'] = 'Não foi possível aceder ao ficheiro: ';
$PHPMAILER_LANG['file_open'] = 'Erro ao abrir o ficheiro: ';
$PHPMAILER_LANG['from_failed'] = 'O envio falhou para o seguinte endereço do remetente: ';
$PHPMAILER_LANG['instantiate'] = 'Não foi possível instanciar a função mail.';
$PHPMAILER_LANG['invalid_address'] = 'Endereço de e-mail inválido: ';
$PHPMAILER_LANG['invalid_header'] = 'Nome ou valor do cabeçalho inválido.';
$PHPMAILER_LANG['invalid_hostentry'] = 'Entrada de host inválida: ';
$PHPMAILER_LANG['invalid_host'] = 'Host inválido: ';
$PHPMAILER_LANG['mailer_not_supported'] = 'O cliente de e-mail não é suportado.';
$PHPMAILER_LANG['provide_address'] = 'Deve fornecer pelo menos um endereço de destinatário.';
$PHPMAILER_LANG['recipients_failed'] = 'Erro SMTP: Falha no envio para os seguintes destinatários: ';
$PHPMAILER_LANG['signing'] = 'Erro ao assinar: ';
$PHPMAILER_LANG['smtp_code'] = 'Código SMTP: ';
$PHPMAILER_LANG['smtp_code_ex'] = 'Informações adicionais SMTP: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'Falha na função SMTP connect().';
$PHPMAILER_LANG['smtp_detail'] = 'Detalhes: ';
$PHPMAILER_LANG['smtp_error'] = 'Erro do servidor SMTP: ';
$PHPMAILER_LANG['variable_set'] = 'Não foi possível definir ou redefinir a variável: ';

View File

@ -1,4 +1,5 @@
<?php
/**
* Brazilian Portuguese PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
@ -6,24 +7,32 @@
* @author Lucas Guimarães <lucas@lucasguimaraes.com>
* @author Phelipe Alves <phelipealvesdesouza@gmail.com>
* @author Fabio Beneditto <fabiobeneditto@gmail.com>
* @author Geidson Benício Coelho <geidsonc@gmail.com>
*/
$PHPMAILER_LANG['authenticate'] = 'Erro de SMTP: Não foi possível autenticar.';
$PHPMAILER_LANG['buggy_php'] = 'Sua versão do PHP é afetada por um bug que por resultar em messagens corrompidas. Para corrigir, mude para enviar usando SMTP, desative a opção mail.add_x_header em seu php.ini, mude para MacOS ou Linux, ou atualize seu PHP para versão 7.0.17+ ou 7.1.3+ ';
$PHPMAILER_LANG['connect_host'] = 'Erro de SMTP: Não foi possível conectar ao servidor SMTP.';
$PHPMAILER_LANG['data_not_accepted'] = 'Erro de SMTP: Dados rejeitados.';
$PHPMAILER_LANG['empty_message'] = 'Mensagem vazia';
$PHPMAILER_LANG['encoding'] = 'Codificação desconhecida: ';
$PHPMAILER_LANG['execute'] = 'Não foi possível executar: ';
$PHPMAILER_LANG['extension_missing'] = 'Extensão não existe: ';
$PHPMAILER_LANG['file_access'] = 'Não foi possível acessar o arquivo: ';
$PHPMAILER_LANG['file_open'] = 'Erro de Arquivo: Não foi possível abrir o arquivo: ';
$PHPMAILER_LANG['from_failed'] = 'Os seguintes remetentes falharam: ';
$PHPMAILER_LANG['instantiate'] = 'Não foi possível instanciar a função mail.';
$PHPMAILER_LANG['invalid_address'] = 'Endereço de e-mail inválido: ';
$PHPMAILER_LANG['invalid_header'] = 'Nome ou valor de cabeçalho inválido';
$PHPMAILER_LANG['invalid_hostentry'] = 'hostentry inválido: ';
$PHPMAILER_LANG['invalid_host'] = 'host inválido: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer não é suportado.';
$PHPMAILER_LANG['provide_address'] = 'Você deve informar pelo menos um destinatário.';
$PHPMAILER_LANG['recipients_failed'] = 'Erro de SMTP: Os seguintes destinatários falharam: ';
$PHPMAILER_LANG['signing'] = 'Erro de Assinatura: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() falhou.';
$PHPMAILER_LANG['smtp_code'] = 'Código do servidor SMTP: ';
$PHPMAILER_LANG['smtp_error'] = 'Erro de servidor SMTP: ';
$PHPMAILER_LANG['smtp_code_ex'] = 'Informações adicionais do servidor SMTP: ';
$PHPMAILER_LANG['smtp_detail'] = 'Detalhes do servidor SMTP: ';
$PHPMAILER_LANG['variable_set'] = 'Não foi possível definir ou redefinir a variável: ';
$PHPMAILER_LANG['extension_missing'] = 'Extensão ausente: ';

View File

@ -1,26 +1,33 @@
<?php
/**
* Romanian PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
* @author Alex Florea <alecz.fia@gmail.com>
*/
$PHPMAILER_LANG['authenticate'] = 'Eroare SMTP: Autentificarea a eșuat.';
$PHPMAILER_LANG['buggy_php'] = 'Versiunea instalată de PHP este afectată de o problemă care poate duce la coruperea mesajelor Pentru a preveni această problemă, folosiți SMTP, dezactivați opțiunea mail.add_x_header din php.ini, folosiți MacOS/Linux sau actualizați versiunea de PHP la 7.0.17+ sau 7.1.3+.';
$PHPMAILER_LANG['connect_host'] = 'Eroare SMTP: Conectarea la serverul SMTP a eșuat.';
$PHPMAILER_LANG['data_not_accepted'] = 'Eroare SMTP: Datele nu au fost acceptate.';
$PHPMAILER_LANG['empty_message'] = 'Mesajul este gol.';
$PHPMAILER_LANG['encoding'] = 'Encodare necunoscută: ';
$PHPMAILER_LANG['execute'] = 'Nu se poate executa următoarea comandă: ';
$PHPMAILER_LANG['extension_missing'] = 'Lipsește extensia: ';
$PHPMAILER_LANG['file_access'] = 'Nu se poate accesa următorul fișier: ';
$PHPMAILER_LANG['file_open'] = 'Eroare fișier: Nu se poate deschide următorul fișier: ';
$PHPMAILER_LANG['from_failed'] = 'Următoarele adrese From au dat eroare: ';
$PHPMAILER_LANG['instantiate'] = 'Funcția mail nu a putut fi inițializată.';
$PHPMAILER_LANG['invalid_address'] = 'Adresa de email nu este validă: ';
$PHPMAILER_LANG['invalid_header'] = 'Numele sau valoarea header-ului nu este validă: ';
$PHPMAILER_LANG['invalid_hostentry'] = 'Hostentry invalid: ';
$PHPMAILER_LANG['invalid_host'] = 'Host invalid: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer nu este suportat.';
$PHPMAILER_LANG['provide_address'] = 'Trebuie să adăugați cel puțin o adresă de email.';
$PHPMAILER_LANG['recipients_failed'] = 'Eroare SMTP: Următoarele adrese de email au eșuat: ';
$PHPMAILER_LANG['signing'] = 'A aparut o problemă la semnarea emailului. ';
$PHPMAILER_LANG['smtp_code'] = 'Cod SMTP: ';
$PHPMAILER_LANG['smtp_code_ex'] = 'Informații SMTP adiționale: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'Conectarea la serverul SMTP a eșuat.';
$PHPMAILER_LANG['smtp_detail'] = 'Detalii SMTP: ';
$PHPMAILER_LANG['smtp_error'] = 'Eroare server SMTP: ';
$PHPMAILER_LANG['variable_set'] = 'Nu se poate seta/reseta variabila. ';
$PHPMAILER_LANG['extension_missing'] = 'Lipsește extensia: ';

Some files were not shown because too many files have changed in this diff Show More