-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added test with mesage body that breaks if dot stuffing is done befor…
…e encoding. Changed `Writer::writeFiltered` to use `stream_filter_prepend`.
- Loading branch information
Showing
2 changed files
with
28 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,8 @@ | |
namespace Kodus\Mail\Test\Integration; | ||
|
||
use IntegrationTester; | ||
use Kodus\Mail\Address; | ||
use Kodus\Mail\Message; | ||
use Kodus\Mail\SMTP\Authenticator\NoAuthenticator; | ||
use Kodus\Mail\SMTP\SMTPMailService; | ||
use Kodus\Mail\Test\TestMessageFactory; | ||
|
@@ -31,4 +33,29 @@ public function sendMail(IntegrationTester $I) | |
$service->send($message); | ||
} | ||
} | ||
|
||
public function ensureDotStuffingHappensBeforeQuotePrintableEncode(IntegrationTester $I) | ||
{ | ||
$text_body = <<<EOT | ||
Test mail 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890. | ||
More text. | ||
EOT; | ||
|
||
$service = new SMTPMailService( | ||
$I->createSocketConnector(), new NoAuthenticator(), "localhost" | ||
); | ||
|
||
$message = new Message( | ||
new Address("[email protected]", "Rasmus åh Schultz"), | ||
new Address("[email protected]"), | ||
"Hey, Rasmus! I like ÆØÅæøå!", | ||
$text_body, | ||
); | ||
|
||
$message->setDate("Thu, 15 Sep 2016 17:20:54 +0200"); | ||
|
||
$message->setSender(new Address("[email protected]")); | ||
|
||
$service->send($message); | ||
} | ||
} |