Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

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

Closed
wants to merge 2 commits into from

3 participants

@mtorromeo

The widely used extension for mime emails in plain text is .eml [1]
This commit changes the currently used .tmp extension to .eml as .tmp does not make much sense in this case anyway.

By doing this one could open directly the email with the associated user agent (eg: by double clicking the file in the file browser).

[1] https://en.wikipedia.org/wiki/Email#Filename_extensions

@mtorromeo mtorromeo Use .eml extensions for emails stored with Zend\Mail\Transport\File
The widely used extension for mime emails in plain text is .eml [1]
This commit changes the currently used .tmp extension to .eml as .tmp does not make much sense in this case anyway.

By doing this one could open directly the email with the associated user agent (eg: by double clicking the file in the file browser).

[1] https://en.wikipedia.org/wiki/Email#Filename_extensions
9649de0
@mtorromeo

Done, thanks!

@weierophinney

Merged to develop for release with 2.3.0.

@mtorromeo mtorromeo deleted the unknown repository branch
@weierophinney weierophinney referenced this pull request from a commit in zendframework/zend-mail
@weierophinney weierophinney Merge pull request zendframework/zf2#4871 from mtorromeo/patch-1
Use .eml extensions for emails stored with Zend\Mail\Transport\File
f11495c
@weierophinney weierophinney referenced this pull request from a commit in zendframework/zend-mail
@weierophinney weierophinney Merge branch 'feature/4871' into develop 29e0c65
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 22, 2013
  1. @mtorromeo

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

    mtorromeo authored
    The widely used extension for mime emails in plain text is .eml [1]
    This commit changes the currently used .tmp extension to .eml as .tmp does not make much sense in this case anyway.
    
    By doing this one could open directly the email with the associated user agent (eg: by double clicking the file in the file browser).
    
    [1] https://en.wikipedia.org/wiki/Email#Filename_extensions
Commits on Jul 23, 2013
  1. @mtorromeo
This page is out of date. Refresh to see the latest.
View
2  library/Zend/Mail/Transport/FileOptions.php
@@ -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;
View
2  tests/ZendTest/Mail/Transport/FileOptionsTest.php
@@ -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()
Something went wrong with that request. Please try again.