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

457 Commits

Author SHA1 Message Date
Marcus Bointon
016cb3395c
Fix INCLUDE_DIR 2017-01-09 12:19:12 +01:00
Marcus Bointon
96c5d32386
Extend line break tests 2017-01-09 10:19:14 +01:00
Marcus Bointon
8914ec7a4b
Merge branch 'master' into 6.0
# Conflicts:
#	VERSION
#	examples/contentsutf8.html
#	src/PHPMailer.php
#	src/POP3.php
#	src/SMTP.php
#	test/bootstrap.php
2017-01-06 23:34:57 +01:00
Marcus Bointon
48e8cac067
Improve msgHTML tests 2017-01-06 22:30:55 +01:00
Marcus Bointon
d1a7de4e94
Make test bootstrap a bit more flexible 2017-01-06 22:27:49 +01:00
Marcus Bointon
789e0846ab
Merge branch 'master' into 6.0
# Conflicts:
#	VERSION
#	extras/htmlfilter.php
#	src/PHPMailer.php
#	src/POP3.php
#	src/SMTP.php
#	test/phpmailerTest.php
2016-12-29 14:01:45 +01:00
Marcus Bointon
dbbbf49d61
Unbreak tests 2016-12-24 15:26:34 +01:00
Marcus Bointon
e0fefda64b
5.2.18 2016-12-24 01:06:31 +01:00
corentinheadoo
a55b67d965 Fix: function call is not case-sensitive (#857) 2016-10-17 16:38:25 +02:00
Marcus Bointon
6931f31028 Simplify validation options, default to filter_var, see #804 2016-09-03 01:02:38 +02:00
Marcus Bointon
1e53c07286 Minor fixes, code style 2016-08-31 10:26:06 +02:00
Marcus Bointon
51e8e91c20 PHPCBF phpdoc cleanup 2016-08-29 11:04:27 +02:00
Marcus Bointon
63e0a2c1db PHPCBF phpdoc cleanup 2016-08-29 10:29:13 +02:00
Marcus Bointon
593a0c586a Remove unneeded PHPDoc tags: @static, @access, @return void, @private
@link -> @see (PSR-5)
Always use `boolean`
2016-08-29 10:21:39 +02:00
Marcus Bointon
ec4c2ee867 Standardise on CRLF line breaks
Better auth mechanism selection
2016-05-23 10:30:31 +02:00
Marcus Bointon
e61b522f2d Merge branch 'master' into 6.0
# Conflicts:
#	src/PHPMailer.php
#	src/SMTP.php
2016-05-22 21:11:00 +02:00
Marcus Bointon
d3c73b1739 Reset encoding on simple bodies, hopefully will fix #728! 2016-05-22 10:26:48 +02:00
Marcus Bointon
c27c1597bc Fix build
Actually changes the test to test a different thing, still need to deal with what it was originally testing.
2016-05-22 01:25:10 +02:00
Marcus Bointon
1a7f380457 Fix test case 2016-05-09 11:36:15 +02:00
Marcus Bointon
86d2b069d8 Merge branch 'master' into 6.0
# Conflicts:
#	changelog.md
#	test/phpmailerTest.php
2016-05-09 11:34:42 +02:00
Marcus Bointon
77c0bc8d28 Add ability to inject custom validator and set custom default validator, fixes #573 2016-05-09 11:18:50 +02:00
Marcus Bointon
f7033d68b6 Remove obsolete QP-encode function
Improve & fix data URL handling
Remove old class loader from phpunit bootstrap
Improve test coverage
Remove some unnecessary trailing line breaks from attachment MIME structure
2016-05-02 18:27:44 +02:00
Marcus Bointon
a46689bed8 Make DKIM canonicalization stricter, add unit tests 2016-05-02 15:18:22 +02:00
Marcus Bointon
2f63fcd3da Defensive comparisons 2016-05-02 12:01:25 +02:00
Marcus Bointon
7a67a33181 Cleanup 2016-05-01 17:45:39 +02:00
Marcus Bointon
efbcfa97c0 Callback cleanup, examples 2016-05-01 17:00:48 +02:00
Marcus Bointon
558bcdc269 DKIM cleanup, examples 2016-05-01 13:09:24 +02:00
Marcus
3abcab1936 Clean up TODOs
Switch SingleToArray to protected
Update Readme
Update composer deps
2016-04-19 18:26:33 +02:00
Marcus
a8b44e9a8e Merge remote-tracking branch 'remotes/upstream/master' into xoauth
# Conflicts:
#	src/PHPMailer.php
2016-04-19 17:30:13 +02:00
František Svoboda
fb82f2b9ea Add unit test that shows how address parser returns its result 2016-04-17 09:49:12 +02:00
Marcus
3d4e3b1a0d Years & version numbers 2016-04-07 11:04:03 +02:00
Marcus
33f82ab517 Merge branch 'master' into 5.4
Bump version to 5.5
Clean up code generator
# Conflicts:
#	README.md
#	examples/send_file_upload.phps
#	src/SMTP.php
#	test/phpmailerTest.php
2016-04-07 10:52:37 +02:00
Marcus
27501ac7b9 Merge branch 'master' into 5.4
Bump version to 5.5
Clean up code generator
# Conflicts:
#	README.md
#	examples/send_file_upload.phps
#	src/SMTP.php
#	test/phpmailerTest.php
2016-04-07 10:51:05 +02:00
Marcus
b7151db9b7 Improve Windows compatibility for tests 2016-03-29 15:14:19 +02:00
Marcus
99bf646428 Ignore files created during tests 2016-03-16 10:02:38 +01:00
Synchro
bf60c58a01 Merge branch 'master' into 5.4
# Conflicts:
#	composer.lock
#	get_oauth_token.php
2016-01-07 18:39:55 +01:00
Synchro
9211ba6728 Ensure Message-ID is always valid, fixes #587 2016-01-07 16:28:39 +01:00
Marcus Bointon
32a99356ef Merge remote-tracking branch 'remotes/upstream/master' into 5.4
# Conflicts:
#	test/phpmailerTest.php
2015-12-22 09:35:50 +01:00
Marcus Bointon
ea7bb516f1 Remove personal email address 2015-12-22 09:23:03 +01:00
Synchro
104359d993 Fix extra line break in getSentMIMEMessage(), fixes #589 2015-12-18 13:16:51 +01:00
Synchro
280e7a51f8 Make parseAddresses static, see #82 2015-12-17 17:32:39 +01:00
Synchro
5cdb01b129 Ignore whatever the problem is with pop3 for now! 2015-12-01 15:44:12 +01:00
Synchro
cccf32b7a6 Fix POP3 script path 2015-12-01 14:23:47 +01:00
Synchro
bd4bb1024a Revert to old code for POP tests, ignore exit errors
Update deps
2015-12-01 10:20:44 +01:00
Synchro
2074c8e5ab See what's happening in the shell 2015-11-24 19:04:12 +01:00
Synchro
a7aa1491ef Ps args 2015-11-24 11:56:07 +01:00
Synchro
f8ed4eba2a PHPUnit again 2015-11-23 08:54:21 +01:00
Synchro
da9666e893 PHPUnit tweaks 2015-11-12 14:43:19 +01:00
Synchro
428949a697 PHPUnit tweaks 2015-11-12 12:51:29 +01:00
Synchro
2ea088ecc5 PHPUnit tweaks 2015-11-12 12:30:31 +01:00
Synchro
6a7ed78618 PHPUnit tweaks 2015-11-12 12:18:21 +01:00
Synchro
eaebda7d66 PHPUnit tweaks 2015-11-12 11:47:10 +01:00
Synchro
1f3a204d70 PHPUnit tweaks 2015-11-12 11:29:23 +01:00
Synchro
f66899617a PHPUnit tweaks 2015-11-12 10:45:16 +01:00
Synchro
0c116a6287 PHPUnit tweaks 2015-11-12 10:13:28 +01:00
Synchro
c9f2347300 PHPUnit tweaks 2015-11-12 10:12:55 +01:00
Synchro
545febf0cf PHPUnit tweaks 2015-11-12 09:43:56 +01:00
Synchro
7a55a752b3 PHPUnit tweaks 2015-11-12 09:37:41 +01:00
Synchro
6bcb0f8f8d PHPUnit tweaks 2015-11-12 08:43:23 +01:00
Synchro
2b632a71be PHPUnit tweaks 2015-11-11 19:20:16 +01:00
Synchro
a0407c6630 Travis & PHPUnit tweaks 2015-11-10 19:09:08 +01:00
Synchro
12805da50a Travis & PHPUnit tweaks 2015-11-10 15:17:46 +01:00
Synchro
fbe62ff9b5 Tidy up copyright notices 2015-11-10 14:44:16 +01:00
Synchro
14e8ef03eb Short array syntax 2015-11-10 13:45:13 +01:00
Synchro
9b3e13dc14 First draft of 5.4 2015-11-09 19:09:13 +01:00
Synchro
6687a96a18 Add test for line breaks in addresses vulnerability
Don't allow line breaks in addresses
Don't allow line breaks in SMTP commands
Rearrange tests so slowest tests run last
2015-11-01 11:12:04 +01:00
François B
0fa9518609 Allow addresses with IDN
Accepts Internationalized Domain Name everywhere PHPMailler expects
email addresses (To, CC, BCC, Reply-To, From, Sender and
ConfirmReadingTo).

Requires PHP >= 5.3 with "intl" extension installed and "mbstring"
extension enabled. Earlier versions don't see a change, i.e. specifying
an address with IDN still fails validation.

Follow-up to PR #516. Ran test/phpmailerTest.php

Other changes:

- From, Sender and ConfirmReadingTo addresses are now validated in
send(). Previously, only From and Sender addresses would be validated
only if specified via the setFrom() method. ConfirmReadingTo was never
validated.

- Half language strings for the 'invalid_address' message used colon at
the end and half didn't. Harmonized messages to always include colon,
and not add a second one with PHP code.
2015-10-14 22:02:07 +02:00
François B
4532cec50d Improve some comments and minor improvements
- Define an $error_message and reuse it, instead of recreating the
error message 3 times
- Use in_array() check instead of a regex
2015-10-13 22:38:15 +02:00
Roman Minchyn
870350756b [TASK]
replace "@type" annotation in favor of "@var" as proposed by phpdoc.org

Issue #513
2015-09-28 11:35:42 +02:00
Synchro
c93759dcd1 Fix issues with embedding items without filenames, fixes #478 2015-08-25 12:01:39 +02:00
Synchro
6f266a2e42 Don't normalise line breaks when QP-encoding, fixes #464 2015-08-01 11:32:18 +02:00
Synchro
199bd9698b Add address parser, fixes #82, #145 2015-05-21 17:05:57 +02:00
Synchro
c7e488d64b Add multiple attachment test 2015-05-04 10:59:56 +02:00
Synchro
9164e6d9eb Corrections to ISO text test
Only test ICS configs that are actually supported!
Fix missing headers when using signed messages
2015-04-29 20:46:10 +02:00
Synchro
4e8a80a657 Merge remote-tracking branch 'remotes/upstream/longlines' 2015-04-29 11:31:39 +02:00
Marcus Bointon
89bb0d6094 Fix file attachment test 2015-04-23 19:33:15 +02:00
Joris Berthelot
47fd54d04d Added custom header getter 2015-04-23 19:06:49 +02:00
Synchro
b83f2a6b6b Merge remote-tracking branch 'remotes/upstream/master' into longlines 2015-04-17 15:16:13 +02:00
Synchro
50eac8739f Use multibyte text in tests
Add explicit test for UTF-8 with embedded images, see #279 and #377
Add ISO-8859-1 test
2015-03-25 19:22:55 +01:00
Synchro
a071e68f46 Fix unique id / boundary problems when creating body before header
Add tests for line length transfer encoding override
2015-03-20 20:58:32 +01:00
Synchro
6e444ac33c Merge remote-tracking branch 'remotes/upstream/master' into longlines
# Conflicts:
#	class.phpmailer.php
#	test/phpmailerTest.php
2015-03-20 19:11:19 +01:00
Synchro
08f7807205 Add UTF-8 tests 2015-03-20 18:11:15 +01:00
Synchro
c39b89fbf3 Tweak MIME preamble
Test output cleanup
2015-03-20 12:03:16 +01:00
Synchro
78f323d326 Tidy up format of test messages 2015-03-18 08:49:42 +01:00
Synchro
3bdaa171c6 Tidy up format of test messages 2015-03-17 19:00:07 +01:00
Synchro
c8be94946e Add MIME preamble to all multipart message types, should fix #316
Tidy up format of test messages
2015-03-17 18:55:11 +01:00
Synchro
d7c44d5a9e Add tests for line breaks in headers, see #372
Minor cleanup
2015-03-16 14:10:14 +01:00
Synchro
1ad1217759 typo 2015-03-16 10:24:39 +01:00
Synchro
4680d1f6cf Improve reporting of missing OpenSSL extension for SSl and TLS, see #378
Add 'missing extension' language string
Improve default handling of language strings
2015-03-16 10:23:38 +01:00
Synchro
c506185d50 Add support for additional CA certificate when S/MIME signing, fixes #376 2015-03-06 16:35:29 +01:00
Synchro
541cfec405 More efficient, more readable loops in wrapText
Add multibyte wordwrap test
phpDoc cleanup in tests
2015-03-04 10:29:46 +01:00
Synchro
c00fdf7b9a Fix inappropriate checks in set(), make more reliable 2015-01-28 12:18:11 +01:00
Synchro
43091014e0 Refactor and major cleanup of EasyPeasyICS, including a fix for #338 2015-01-09 14:13:47 +01:00
Synchro
ecce82a38b Use autoloader 2015-01-05 09:13:09 +01:00
Synchro
127d26ef3c Remove 'advanced' html2text converter to resolve license clash, fixes #232
Allow injection of custom html2text converter, amend tests to cover it
Update README and related docs
2014-12-17 16:07:02 +01:00
Synchro
b7f1dd174d Make tests a bit less verbose 2014-12-06 15:07:54 +01:00
Synchro
aa8e499b8a Deal with excessively long lines, see #314 2014-11-14 10:15:45 +01:00
Synchro
6365f4d6fd PHPDoc cleanup - consistent naming of integer and boolean types 2014-06-06 09:45:38 +02:00
Synchro
ca71445fb2 Make tests check for config
Generate debug output during POP tests
Ignore errors during POP3 disconnect
Update PHPUnit dependency to 4.1 in composer
2014-06-05 16:58:17 +02:00
Synchro
1a8fae1535 Remove fixed PHPUnit loader 2014-05-01 11:43:40 +02:00
Synchro
f03b54f01d Remove fixed PHPUnit loader
Add hhvm to test envs
2014-05-01 11:42:50 +02:00
Synchro
3d246420c4 Reorder tests to fail faster 2014-04-08 13:32:46 +02:00
Synchro
cc99349c15 Enable debug output during tests - increases coverage! 2014-04-03 13:49:44 +02:00
Synchro
943e0bd529 New graphics 2014-03-10 16:25:31 +01:00
Synchro
379b700e77 Add config for scrutinizer 2013-12-17 08:43:48 +01:00
Elan Ruusamäe
f302f1d497 fix parse error under php 5.2.17
```
$ php -l test/phpmailerTest.php
PHP Parse error:  syntax error, unexpected T_SL in
test/phpmailerTest.php on line 746
Errors parsing test/phpmailerTest.php
```
2013-11-09 14:53:45 +02:00
Synchro
41415a821f Manually merge my qmail patches for #126
Minor cleanups
2013-10-29 11:17:57 +01:00
Synchro
70ba3fbc0f Fix the way that SMTP host lists are parsed, see #112 2013-09-24 14:35:34 +02:00
Synchro
accd948dad Alter the way that SMTP host lists are parsed, fixes #112 2013-09-23 09:12:02 +02:00
Synchro
09a978fb1c Tests for messageID
Minor cleanup
2013-08-30 18:51:37 +02:00
Synchro
cd4ed6130a Fix POP3 test failures
Fake pop server can now specify a port to run on
2013-08-05 18:12:08 +02:00
Synchro
73093a32a3 Add fake pop server and POP-before-SMTP tests.
Update POP before SMTP example to use new static method.
2013-08-02 16:19:01 +02:00
Synchro
331d24bc82 Fix Q-encoding for strings containing '=', fixes #91 2013-08-01 09:55:26 +02:00
Synchro
d992ae6dc4 Centralise check for debug output
PSR-2 reformat

Enable debug output for failing test

Fix broken test
Comment clearout

Proper thin spaces before French punctuation

Fix phpdocs for addrAppend and addrFormat, fixes #81
Minor code cleanup, remove some local vars

See changelog.

More phpdoc cleanup
2013-07-30 12:51:15 +02:00
Synchro
2032af0d56 Fix bad return for failed attachment
Add test for failing attachment
2013-06-06 17:31:11 +02:00
Synchro
3c80c56a55 Add iCal event attachments and test case, fixes #47, thanks to @reblutus
Minor code cleanup
Bundle EasyPeasyICS class in extras
2013-05-29 02:15:17 +02:00
Synchro
7f39eff84b Code cleanup 2013-05-16 17:08:50 +02:00
Synchro
3215f89736 Use a different stream option to see if it works with Travis 2013-05-16 17:05:23 +02:00
Synchro
85136af8b6 Use new support for stream options on SMTP connect, add tests for it 2013-05-16 11:44:09 +02:00
Synchro
9cbce116dc Add support for stream options on SMTP connect, use stream_socket_client instead of fsockopen, thanks to @stanislavdavid 2013-05-16 11:33:19 +02:00
Synchro
3666c3469a Fix cid generation in MsgHTML (Thanks to @digitalthought), fixes #60
Fix handling of multiple SMTP servers (Thanks to @NanoCaiordo), see #58, #32
2013-05-15 12:36:42 +02:00
Synchro
bfe6f6b183 More secure temp folder selection in fakesendmail
Use .eml extension for created files, works better with Apple Mail
2013-05-10 03:18:16 +02:00
Marcus Bointon
019499efc3 Convert line breaks to CRLF in MsgHTML, closes #52
Fix double suffix on image cids, see #50
Remove unneeded test files, re-use example content for tests
Remove reference to phpmailer-lite
Ignore .idea folder
2013-05-01 10:20:10 +02:00
Synchro
ff8718f722 Major overhaul and cleanup of example code
Update test_script to use some recently changed features, rename to code_generator
Generated code actually works!
Update SyntaxHighlighter
New PHPMailer graphic
2013-04-26 18:22:45 +02:00
Synchro
72f41f1f64 Determine MIME type of attachments automatically
Add cross-platform, multibyte-safe pathinfo replacement and use it
2013-04-25 12:24:43 +02:00
Synchro
4d9434e394 5.2.6 release
See changelog
2013-04-11 18:45:39 +02:00
Synchro
0642bf5901 Move house 2013-04-02 09:12:48 +02:00
Synchro
e26b905f3e Add tests for trying to add empty addresses 2013-03-21 16:06:47 +01:00
Synchro
9a279e3a6f Implement an 'advanced' html to text converter for MsgHTML, using the html2text class we already bundle [via SourceForge](https://sourceforge.net/p/phpmailer/bugs/368/)
Some code cleanup in tests
2013-03-21 15:08:29 +01:00
Synchro
5d64a6ea77 Add mechanism for allowing sending messages with an empty body [via SourceForge](https://sourceforge.net/p/phpmailer/bugs/334/) 2013-03-21 11:56:26 +01:00
Synchro
230e369b30 Add unit test for EncodeQ [via SourceForge](https://sourceforge.net/p/phpmailer/bugs/341/)
Minor PHPDoc cleanup
2013-03-21 11:10:52 +01:00
Synchro
997a4027de Various small fixes and changes from SourceForge 2013-03-06 23:55:58 +01:00
Synchro
9dd16cef4e Quotes, indents, add test for BCC-only 2013-03-06 17:34:28 +01:00
Synchro
263bf4fa27 Try another tack, try to see how php is configured on Travis 2013-02-28 19:25:31 +01:00
Synchro
0680e1c7ce Test Travis mail config 2013-02-28 19:09:53 +01:00
Synchro
8ad881fb30 Don't try to use the mail() function if it's not available, should fix Travis-CI builds. 2013-02-28 18:29:55 +01:00
Synchro
dfc40d56ce Break out translation tests into separate test case so Travis can pass the rest of the code, see #24 2013-02-28 17:53:20 +01:00
Synchro
c15920ece2 Make MsgHTML() always overwrite AltBody, fixes #28
Break out html to text conversion to a method so it can be overridden easily and use it internally, fixes #29
2013-02-28 14:21:00 +01:00
Synchro
adb0197c10 Merge in changes from Google code 5.2.4 release
Code cleanup in SMTP class
2013-02-21 12:44:28 +01:00
Synchro
a51a9e1818 Fix location of true 2013-02-02 21:10:17 +01:00
Synchro
07f7a1bdd5 Add fake sendmail script, adjust travis config to use it 2013-02-02 18:41:54 +01:00
Synchro
edbefba3b7 Add example test config, adjust test setup to use it, see #19 2013-02-01 16:05:17 +01:00
Synchro
691d7b086c Cleanup 2013-01-31 12:04:26 +01:00
Synchro
b53ab113a8 Add unit test for S/MIME signing
Add checks for OpenSSL before trying to use it
2013-01-31 11:48:45 +01:00
Synchro
104869b669 Updated validation regex from Michael Rushton
Update unit tests
2012-12-04 17:35:58 +01:00
Synchro
10c57b72fe Merge changes from Google Code 5.2.2 release, thanks Jim
Replace Quoted-Printable encoder, improve tests
Reformat changelog using markdown
Coding standards
2012-12-04 12:15:39 +01:00
Synchro
95cc8b829b Add info & test case for CRAM-MD5 auth
Fix validation test
Fix misdocumented do_debug property in SMTP
Code cleanup
2012-12-04 10:33:23 +01:00
Synchro
a50834223d Make ValidateAddress return an explicit boolean as docs say it does
Reformat regex slightly, seemed to produce odd effects with literal tab chars in: This fixes #10
Add email validation test cases
Reformulate translation test case so all problems are reported together
2012-12-03 15:19:38 +01:00
Synchro
6f919df65e Import 5.2.2rc2 from Google Code
Major cleanup of PHPDocs
Test suite works again
2012-11-21 16:12:07 +01:00
Marcus Bointon
cca7fc22fb Import PHPMailer 5.2.0 from apache project 2011-08-23 10:20:10 +02:00
Marcus Bointon
5b661107ca Import 5.1 2010-06-23 16:46:33 +00:00
Marcus Bointon
8d4fc6d507 Merge in changes from the 5.0-dev branch 2009-05-05 11:22:26 +00:00
Marcus Bointon
263bf12e2e Make address clearing functions also remove entries from all_recipients array
Add doctype and charset to test output
Fix error test
Make test resuts a bit prettier
Improve addressing tests
Fix Russian and Polish corrupted language files, make sure all use UTF-8
Remove BOM from chinese language file
Make sure file descriptior is closed in EncodeFile
Fix private access problems to SMTP error message by adding getError function (caused by recent addition of SMTP error reporting)
All unit tests now pass
2008-11-21 14:21:06 +00:00
Marcus Bointon
51d601058c Convert getFile function to simpler PHP5 version
Add a unit test for getFile
2008-11-20 22:43:07 +00:00
Marcus Bointon
c472d9a54f Add test to check for missing translations (will often spot corrupt ones too) 2008-11-20 22:21:44 +00:00
Marcus Bointon
5aeead7e70 Update unit test class so it doesn't generate warnings for call-time pass-by-reference errors in PHP5
Fix attachment tests to use new GetAttachments function instead of trying to access the private $attachments property
Check that local dir is writable before trying to write file (and use neater PHP5 syntax)
Add tests for new duplicate address checking on AddAddress, AddCC, AddBCC
2008-11-20 20:46:29 +00:00
Marcus Bointon
fb07adf194 Fix wrong folder nesting 2008-11-11 15:34:07 +00:00