diff --git a/.travis.yml b/.travis.yml index e686d783..3dd7ea8e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,9 +9,12 @@ php: matrix: allow_failures: - - php: 7.0 - php: hhvm + include: + - php: 5.6 + env: dependencies="--prefer-lowest --prefer-stable" + script: - vendor/bin/tester tests -s -p php - php code-checker/src/code-checker.php @@ -22,5 +25,11 @@ after_failure: before_script: # Install Nette Tester & Code Checker - - composer install --no-interaction --prefer-source - - composer create-project nette/code-checker code-checker ~2.3 --no-interaction --prefer-source + - travis_retry composer update --no-interaction --prefer-dist $dependencies + - travis_retry composer create-project nette/code-checker code-checker ~2.5 --no-interaction + +sudo: false + +cache: + directories: + - $HOME/.composer/cache diff --git a/composer.json b/composer.json index 5737f5fe..a1383394 100644 --- a/composer.json +++ b/composer.json @@ -1,16 +1,16 @@ { "name": "nette/mail", "description": "Nette Mail: Sending E-mails", - "homepage": "http://nette.org", + "homepage": "https://nette.org", "license": ["BSD-3-Clause", "GPL-2.0", "GPL-3.0"], "authors": [ { "name": "David Grudl", - "homepage": "http://davidgrudl.com" + "homepage": "https://davidgrudl.com" }, { "name": "Nette Community", - "homepage": "http://nette.org/contributors" + "homepage": "https://nette.org/contributors" } ], "require": { diff --git a/contributing.md b/contributing.md index a1cbbd53..860882bf 100644 --- a/contributing.md +++ b/contributing.md @@ -5,7 +5,7 @@ The issue tracker is the preferred channel for bug reports, features requests and submitting pull requests, but please respect the following restrictions: * Please **do not** use the issue tracker for personal support requests (use - [Nette forum](http://forum.nette.org) or [Stack Overflow](http://stackoverflow.com)). + [Nette forum](https://forum.nette.org) or [Stack Overflow](http://stackoverflow.com)). * Please **do not** derail or troll issues. Keep the discussion on topic and respect the opinions of others. @@ -21,7 +21,7 @@ fits with the scope and aims of the project. It's up to *you* to make a strong case to convince the project's developers of the merits of this feature. Nette welcomes **pull requests**. If you'd like to contribute, please take a moment -to [read the guidelines](http://nette.org/en/contributing) in order to make +to [read the guidelines](https://nette.org/en/contributing) in order to make the contribution process easy and effective for everyone involved. Thanks! diff --git a/license.md b/license.md index af571d59..cf741bd0 100644 --- a/license.md +++ b/license.md @@ -21,7 +21,7 @@ If your stuff is good, it will not take long to establish a reputation for yours New BSD License --------------- -Copyright (c) 2004, 2014 David Grudl (http://davidgrudl.com) +Copyright (c) 2004, 2014 David Grudl (https://davidgrudl.com) All rights reserved. Redistribution and use in source and binary forms, with or without modification, diff --git a/src/Bridges/MailDI/MailExtension.php b/src/Bridges/MailDI/MailExtension.php index 79e2b01e..2b40371b 100644 --- a/src/Bridges/MailDI/MailExtension.php +++ b/src/Bridges/MailDI/MailExtension.php @@ -1,8 +1,8 @@ #Uis' => '', '#]#i' => ' $0', + '#]*href=("|\')([^\\1]+)\\1[^>]*>(.*?)#i' => '$3 <$2>', '#[\r\n]+#' => ' ', '#<(/?p|/?h\d|li|br|/tr)[ >/]#i' => "\n$0", )); diff --git a/src/Mail/MimePart.php b/src/Mail/MimePart.php index 0308b512..b648f08a 100644 --- a/src/Mail/MimePart.php +++ b/src/Mail/MimePart.php @@ -1,8 +1,8 @@ setFrom('John Doe '); +$mail->addTo('Lady Jane '); +$mail->setSubject('Hello Jane!'); + +$mail->setHTMLBody('Příliš žluťoučký' . + '
kůň
'); + +$mailer = new TestMailer(); +$mailer->send($mail); + +Assert::match(<< +To: Lady Jane +Subject: Hello Jane! +Message-ID: <%S%@%S%> +Content-Type: multipart/alternative; + boundary="--------%S%" + +----------%S% +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Příliš žluťoučký +kůň +----------%S% +Content-Type: text/html; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Příliš žluťoučký
kůň
+----------%S%-- +EOD +, TestMailer::$output);