summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source/libraries
diff options
context:
space:
mode:
authorMatteo Mattei <matteo.mattei@gmail.com>2012-03-15 12:00:44 +0100
committerMatteo Mattei <matteo.mattei@gmail.com>2012-03-15 12:00:44 +0100
commit5a98a3dda56f6167f8241a7bc7d1c8784d98ccf9 (patch)
treec5b204ebe62f920756c1f0c2090dae14ab96a6bf /user_guide_src/source/libraries
parent5688d58688318cecaf9decdde014635f3a27760f (diff)
Email class: move string_attach() to attach() and add documentation
Diffstat (limited to 'user_guide_src/source/libraries')
-rw-r--r--user_guide_src/source/libraries/email.rst14
1 files changed, 11 insertions, 3 deletions
diff --git a/user_guide_src/source/libraries/email.rst b/user_guide_src/source/libraries/email.rst
index 27b704dae..d05439a77 100644
--- a/user_guide_src/source/libraries/email.rst
+++ b/user_guide_src/source/libraries/email.rst
@@ -228,10 +228,18 @@ use the function multiple times. For example::
$this->email->attach('/path/to/photo2.jpg');
$this->email->attach('/path/to/photo3.jpg');
-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::
+$filename, $str = '', $mime = '', $disposition = '', $newname = NULL
+If you need to use a buffer string instead of a real (physical) file you can use the
+second and third parameters that are respectively the buffer and the mime-type::
+
+ $this->email->attach('report.pdf', $buffer, 'application/pdf');
+
+If you'd like to change the disposition or add a custom file name, you can use the
+fourth and fifth paramaters. To use the default disposition (attachment), leave the
+fourth 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->attach('/path/to/photo1.jpg', '', '', 'inline');
+ $this->email->attach('/path/to/photo1.jpg', '', '', '', 'birthday.jpg');
$this->email->print_debugger()