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

488 Commits

Author SHA1 Message Date
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
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
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
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
Marcus Bointon
3104b10d73
Merge pull request #2852 from mta59066/xclient
XCLIENT implementation
2023-11-23 09:12:59 +01:00
Frank Forte
174653aa27 Add methods to update or clear custom headers by name. 2023-11-22 11:35:33 -05:00
Marcus Bointon
e88da8d679
Fix test 2023-08-29 10:26:30 +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
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
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
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
6384753f6e protected xclient variable and added tests 2023-01-04 14:13:07 +03: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
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
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
91c442fccd
Add failing test for #2786 2022-10-04 11:02:03 +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
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
bf99c202a9
Avoid passing null to functions, fixes #2667 2022-04-12 10:05:58 +02: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
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
03649a2ffb
CS 2022-02-28 15:11:05 +01:00
Marcus Bointon
ec421d0680
CS 2022-02-28 15:09:27 +01:00