From 300e3f04404e771de89351e410699e447759175a Mon Sep 17 00:00:00 2001 From: Petr Heralecky Date: Fri, 10 Jan 2014 11:49:11 +0100 Subject: Added Email::attach_cid() returning CID --- user_guide_src/source/changelog.rst | 2 ++ user_guide_src/source/libraries/email.rst | 24 ++++++++++++++++++++++-- 2 files changed, 24 insertions(+), 2 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 0488d9d4a..e8dc880e8 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -334,6 +334,8 @@ Release Date: Not Released - Added custom filename to ``Email::attach()`` as ``$this->email->attach($filename, $disposition, $newname)``. - Added possibility to send attachment as buffer string in ``Email::attach()`` as ``$this->email->attach($buffer, $disposition, $newname, $mime)``. + - Email attachments are creating in function Email::attach() - it's faster for sending many emails with same attachments + - Added method Email::attach_cid() returning CID which enables to embed an attachment to html. - Added dsn (delivery status notification) option. - Renamed method _set_header() to set_header() and made it public to enable adding custom headers in the :doc:`Email Library `. - Successfully sent emails will automatically clear the parameters. diff --git a/user_guide_src/source/libraries/email.rst b/user_guide_src/source/libraries/email.rst index 39629ece1..90b71142b 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('photo1'); + $this->email->send(); + } + + CID for each Email have to be create again to be unique. + $this->email->print_debugger() ------------------------------ -- cgit v1.2.3-24-g4f1b From de88615b7245f00d086d97a9fb5ea8b307d34c4f Mon Sep 17 00:00:00 2001 From: Petr Heralecky Date: Fri, 10 Jan 2014 12:52:56 +0100 Subject: styleguided --- user_guide_src/source/changelog.rst | 3 +-- user_guide_src/source/libraries/email.rst | 18 +++++++++--------- 2 files changed, 10 insertions(+), 11 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index e8dc880e8..34eff5d57 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -334,8 +334,7 @@ Release Date: Not Released - Added custom filename to ``Email::attach()`` as ``$this->email->attach($filename, $disposition, $newname)``. - Added possibility to send attachment as buffer string in ``Email::attach()`` as ``$this->email->attach($buffer, $disposition, $newname, $mime)``. - - Email attachments are creating in function Email::attach() - it's faster for sending many emails with same attachments - - Added method Email::attach_cid() returning CID which enables to embed an attachment to html. + - Added method ``Email::attach_cid()`` returning CID which enables to embed an attachment to html. - Added dsn (delivery status notification) option. - Renamed method _set_header() to set_header() and made it public to enable adding custom headers in the :doc:`Email Library `. - Successfully sent emails will automatically clear the parameters. diff --git a/user_guide_src/source/libraries/email.rst b/user_guide_src/source/libraries/email.rst index 90b71142b..274d88d46 100644 --- a/user_guide_src/source/libraries/email.rst +++ b/user_guide_src/source/libraries/email.rst @@ -277,15 +277,15 @@ $this->email->attach_cid() :: - $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('photo1'); - $this->email->send(); - } + $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('photo1'); + $this->email->send(); + } CID for each Email have to be create again to be unique. -- cgit v1.2.3-24-g4f1b