Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Use .eml extensions for emails stored with Zend\Mail\Transport\File #4871

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion library/Zend/Mail/Transport/FileOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public function getCallback()
{
if (null === $this->callback) {
$this->setCallback(function ($transport) {
return 'ZendMail_' . time() . '_' . mt_rand() . '.tmp';
return 'ZendMail_' . time() . '_' . mt_rand() . '.eml';
});
}
return $this->callback;
Expand Down
2 changes: 1 addition & 1 deletion tests/ZendTest/Mail/Transport/FileOptionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function testDefaultCallbackIsSetByDefault()
$callback = $this->options->getCallback();
$this->assertTrue(is_callable($callback));
$test = call_user_func($callback, '');
$this->assertRegExp('#^ZendMail_\d+_\d+\.tmp$#', $test);
$this->assertRegExp('#^ZendMail_\d+_\d+\.eml$#', $test);
}

public function testPathIsMutable()
Expand Down