diff options
author | Phil Sturgeon <email@philsturgeon.co.uk> | 2011-11-24 18:36:28 +0100 |
---|---|---|
committer | Phil Sturgeon <email@philsturgeon.co.uk> | 2011-11-24 18:36:28 +0100 |
commit | e101593561a10632c1d63180436b19f1d7115046 (patch) | |
tree | d88c03d6d1479231defb2e82582c0ceb0ebf98c9 /user_guide_src | |
parent | c72e172f158747b75ee524b46f5819c4bf3d0eaa (diff) | |
parent | e3d60b8880abb09555509e650aafe07136d1adee (diff) |
Merge pull request #704 from bitrayne/develop
Allow a custom file name for email attachments.
Diffstat (limited to 'user_guide_src')
-rw-r--r-- | user_guide_src/source/changelog.rst | 3 | ||||
-rw-r--r-- | user_guide_src/source/libraries/email.rst | 6 |
2 files changed, 7 insertions, 2 deletions
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index b9ca39cee..dff4f001d 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -44,7 +44,8 @@ Release Date: Not Released - Added max_filename_increment config setting for Upload library. - CI_Loader::_ci_autoloader() is now a protected method. - Modified valid_ip() to use PHP's filter_var() when possible (>= PHP 5.2) in the :doc:`Form Validation library <libraries/form_validation>`. - + - Added custom filename to Email::attach() as $this->email->attach($filename, $disposition, $newname) + - Core - Changed private functions in CI_URI to protected so MY_URI can diff --git a/user_guide_src/source/libraries/email.rst b/user_guide_src/source/libraries/email.rst index 759899242..27b704dae 100644 --- a/user_guide_src/source/libraries/email.rst +++ b/user_guide_src/source/libraries/email.rst @@ -228,7 +228,11 @@ use the function multiple times. For example:: $this->email->attach('/path/to/photo2.jpg'); $this->email->attach('/path/to/photo3.jpg'); - $this->email->send(); +If you'd like to change the disposition or add a custom file name, you can use the second and third paramaters. To use the default disposition (attachment), leave the second parameter blank. Here's an example:: + + $this->email->attach('/path/to/photo1.jpg', 'inline'); + $this->email->attach('/path/to/photo1.jpg', '', 'birthday.jpg'); + $this->email->print_debugger() ------------------------------- |