Commit Graph

345 Commits

Author SHA1 Message Date
Marcus Bointon 80fc8686fc
6.7 2022-12-05 11:56:35 +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
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 e7bd0d1f6d
Add return type annotation 2022-11-14 10:58:16 +01:00
Marcus Bointon 8b6386d741
6.6.5 2022-10-07 14:23:10 +02:00
Darren Sim c4ed6172a5 fix bug in addAttachment with folder's instead of filenames 2022-10-04 00:04:01 +01: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
Marcus Bointon 21768617e2
Fix possible null param to explode, fixes #2760 2022-09-02 23:39:13 +02:00
Marcus Bointon a94fdebaea
6.6.4 2022-08-22 11:22:00 +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
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
Marcus Bointon a04c4c2d72
Clarify SMTP auth options, fixes #2732 2022-07-19 17:12:48 +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
Darren Eberly 1eb0816252 Automatic text/csv detection 2022-07-07 10:47:06 -04:00
mortalys e5f9e2aefc
Verification is required 2022-06-29 09:20:16 +01:00
Marcus Bointon 9400f305a8
6.6.3 2022-06-20 11:21:02 +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
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 a4bf414da6
6.6.1 2022-06-14 10:19:03 +02:00
Marcus Bointon bf99c202a9
Avoid passing null to functions, fixes #2667 2022-04-12 10:05:58 +02: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 cb53dde517
6.6.0 2022-02-28 15:26:21 +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 c0d9f7dd3c
6.5.4 2022-02-17 09:19:04 +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
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 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 1abbf09a3b CS 2021-11-19 19:32: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 537927b550
Fix for ini_get issue in PHP 5.6, fixes #2529 2021-10-20 16:39:14 +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
Peter Scopes 21974a05a1 #2523 adds OAuthTokenProvider interface to allow for other oauth libraries 2021-10-11 09:44:18 +01:00