0
0
mirror of https://github.com/PHPMailer/PHPMailer.git synced 2024-09-19 17:42:14 +02:00
Commit Graph

2433 Commits

Author SHA1 Message Date
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