summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source/libraries
diff options
context:
space:
mode:
authorMatteo Mattei <matteo.mattei@gmail.com>2012-03-26 10:27:17 +0200
committerMatteo Mattei <matteo.mattei@gmail.com>2012-03-26 10:27:17 +0200
commitc3b36f4c6b8e8b15c96d6653ebdf07c76eb57d9e (patch)
tree45e9e7458dd998b93762f704f2f6e158063f6e36 /user_guide_src/source/libraries
parentdf59c687a2243142e6da9d7b904523a1b91ca09b (diff)
Centralize handling of attach() function for both real file and buffer string.
Update documentation.
Diffstat (limited to 'user_guide_src/source/libraries')
-rw-r--r--user_guide_src/source/libraries/email.rst20
1 files changed, 11 insertions, 9 deletions
diff --git a/user_guide_src/source/libraries/email.rst b/user_guide_src/source/libraries/email.rst
index 2be50fd35..19c2706d9 100644
--- a/user_guide_src/source/libraries/email.rst
+++ b/user_guide_src/source/libraries/email.rst
@@ -228,18 +228,20 @@ use the function multiple times. For example::
$this->email->attach('/path/to/photo2.jpg');
$this->email->attach('/path/to/photo3.jpg');
-To use the default disposition (attachment), leave the second parameter blank.
-If you need to use a buffer string instead of a real (physical) file you can use the
-third and fourth parameters that are respectively the buffer and the mime-type::
+To use the default disposition (attachment), leave the second parameter blank,
+otherwise use a custom disposition::
- $this->email->attach('report.pdf', 'inline', $buffer, 'application/pdf');
+ $this->email->attach('image.jpg', 'inline');
-If you'd like to add a custom file name, you can use the fifth paramaters.
-Here's an example::
-
- $this->email->attach('/path/to/photo1.jpg', '', '', '', 'inline');
- $this->email->attach('/path/to/photo1.jpg', '', '', '', 'birthday.jpg');
+If you'd like to use a custom file name, you can use the third paramater::
+ $this->email->attach('filename.pdf', 'attachment', 'report.pdf');
+
+If you need to use a buffer string instead of a real - physical - file you can
+use the first parameter as buffer, the third parameter as file name and the fourth
+parameter as mime-type::
+
+ $this->email->attach($buffer, 'attachment', 'report.pdf', 'application/pdf');
$this->email->print_debugger()
-------------------------------