summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source
diff options
context:
space:
mode:
Diffstat (limited to 'user_guide_src/source')
-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()