Commit Graph

48 Commits

Author SHA1 Message Date
Marcus Bointon 22e81749ae
Switch from PHP CS fixer to phpcs and apply PSR12 reformatting 2020-10-13 15:08:42 +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
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 13e9224c1e
Update copyright year 2020-09-02 08:41:14 +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 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 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
Pierre Grimaud 5b63b3955c
Fix typos (#2037) 2020-04-26 10:31:39 +02: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 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 594fbb4182
Don't allow headers to contain breaks, fixes #1984 2020-02-20 12:01:48 +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 e4123e66b4 Merge branch 'master' into dkimrevision 2019-10-20 19:37:17 +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 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 961e782634
Test was wrong before, even though it results in an unexpected space 2019-10-11 12:54:15 +02:00
Marcus Bointon 47a31a2f7f
Test fixes 2019-10-11 10:24:15 +02:00
Marcus Bointon aa07c8f7c7
DKIM_add rewrite, see #1860 2019-10-10 15:57:08 +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
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 8414097b86
Use constants more consistently 2019-09-24 12:38:51 +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 463ccbbf16
Standards 2019-05-27 21:26:41 +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
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 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
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 8190d73eb5
Standards 2018-11-16 01:41:32 +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
Gabriel Caruso 43b774272b Use dedicated assertContains assertion (#1594) 2018-11-11 16:34:54 +01: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
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
François B 10341cc310 Make idnSupported() static (#1203)
Upgrade guide and changelog say that idnSupported() is now static, but it actually isn't.

Probably this PR should wait v6.1 or other version where breaking changes are OK.
2017-10-14 08:22:54 +02:00
Marcus Bointon d47a148ebc
Add missing POP3 name import 2017-09-29 16:10:11 +02:00
Marcus Bointon f47cfbdd75
Switch to using max line length *without* including line break length. See #1181 2017-09-29 16:09:25 +02:00
Filippo Tessarotto 992392437c Tests improvements (#1162)
* Move tests to proper namespace; enforce signatures

* Travis stages, check coding-standard before tests

* Test against PHP 7.2

* CS Fix

* Remove php-cs-fixer on test builds

* Travis: remove phpdocumentor/phpdocumentor from builds

* Allow PHPUnit 5
2017-09-14 18:47:12 +02:00
Filippo Tessarotto dc54e2b93c Show debug log only when tests fail (#1161) 2017-09-14 15:56:04 +02:00
Filippo Tessarotto 9e05e796d0 Enforce PSR-4 (#1159) 2017-09-14 12:55:50 +02:00
Renamed from test/phpmailerTest.php (Browse further)