summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source/libraries/email.rst
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2014-01-10 13:34:16 +0100
committerAndrey Andreev <narf@devilix.net>2014-01-10 13:34:16 +0100
commit2b21ee8dcf040d7c749e0010c46492d221d25552 (patch)
tree623ff905fa213482b6aad6920db0358fcf8d5ecb /user_guide_src/source/libraries/email.rst
parenta0a73c977ce25911f56948d89de817b3ca83adcb (diff)
parent9ad2fff4492e1e216aad0b03714ddfcb7a06d697 (diff)
Merge pull request #2807 from melounek/develop
Added Email::attach_cid() returning CID which enables to embed an attachment to html
Diffstat (limited to 'user_guide_src/source/libraries/email.rst')
-rw-r--r--user_guide_src/source/libraries/email.rst24
1 files changed, 22 insertions, 2 deletions
diff --git a/user_guide_src/source/libraries/email.rst b/user_guide_src/source/libraries/email.rst
index 39629ece1..274d88d46 100644
--- a/user_guide_src/source/libraries/email.rst
+++ b/user_guide_src/source/libraries/email.rst
@@ -247,8 +247,8 @@ $this->email->attach()
----------------------
Enables you to send an attachment. Put the file path/name in the first
-parameter. Note: Use a file path, not a URL. For multiple attachments
-use the method multiple times. For example::
+parameter. For multiple attachments use the method multiple times.
+For example::
$this->email->attach('/path/to/photo1.jpg');
$this->email->attach('/path/to/photo2.jpg');
@@ -269,6 +269,26 @@ parameter as mime-type::
$this->email->attach($buffer, 'attachment', 'report.pdf', 'application/pdf');
+$this->email->attach_cid()
+ --------------------------
+
+ Returns CID which enables to embed an attachment to html. First parameter
+ must be attached file.
+
+ ::
+
+ $filename = '/img/photo1.jpg';
+ $this->email->attach($filename);
+ foreach ($list as $address)
+ {
+ $this->email->to($address);
+ $cid = $this->email->attach_cid($filename);
+ $this->email->message('<img src='cid:". $cid ."' alt="photo1" />');
+ $this->email->send();
+ }
+
+ CID for each Email have to be create again to be unique.
+
$this->email->print_debugger()
------------------------------