diff options
author | Derek Jones <derek.jones@ellislab.com> | 2013-07-21 20:00:38 +0200 |
---|---|---|
committer | Derek Jones <derek.jones@ellislab.com> | 2013-07-21 20:00:38 +0200 |
commit | c43dc1e6b34104c4c060f2e0fc07ea61cabbf6c1 (patch) | |
tree | 88cee10142a65c1e7ab3fa1d1aa91816bfe30e6c /user_guide_src | |
parent | 7e69feae3f805eafe5f8c4966c1e1b2af79ddbb8 (diff) |
Update Email helper docs
Diffstat (limited to 'user_guide_src')
-rw-r--r-- | user_guide_src/source/helpers/email_helper.rst | 62 |
1 files changed, 34 insertions, 28 deletions
diff --git a/user_guide_src/source/helpers/email_helper.rst b/user_guide_src/source/helpers/email_helper.rst index b38e7ec46..fe3ccdda1 100644 --- a/user_guide_src/source/helpers/email_helper.rst +++ b/user_guide_src/source/helpers/email_helper.rst @@ -6,9 +6,14 @@ The Email Helper provides some assistive functions for working with Email. For a more robust email solution, see CodeIgniter's :doc:`Email Class <../libraries/email>`. -.. contents:: Page Contents +.. important:: The Email helper is **deprecated**. -.. important:: The Email helper is DEPRECATED. +.. contents:: + :local: + +.. raw:: html + + <div class="custom-index container"></div> Loading this Helper =================== @@ -17,37 +22,36 @@ This helper is loaded using the following code:: $this->load->helper('email'); +Available Functions +=================== + The following functions are available: -valid_email() -============= .. function:: valid_email($email) :param string $email: Email address :returns: bool -Checks if the input is a correctly formatted e-mail address. Note that is -doesn't actually prove that the address will be able recieve mail, but -simply that it is a validly formed address. + Checks if the input is a correctly formatted e-mail address. Note that is + doesn't actually prove that the address will be able recieve mail, but + simply that it is a validly formed address. -Example:: + Example:: - if (valid_email('email@somesite.com')) - { - echo 'email is valid'; - } - else - { - echo 'email is not valid'; - } + if (valid_email('email@somesite.com')) + { + echo 'email is valid'; + } + else + { + echo 'email is not valid'; + } -.. note:: All that this function does is to use PHP's native ``filter_var()``: - | - | (bool) filter_var($email, FILTER_VALIDATE_EMAIL); + .. note:: All that this function does is to use PHP's native ``filter_var()``:: + + (bool) filter_var($email, FILTER_VALIDATE_EMAIL); -send_email() -============ .. function:: send_email($recipient, $subject, $message) @@ -56,12 +60,14 @@ send_email() :param string $message: Message body :returns: bool -Sends an email using PHP's native `mail() <http://www.php.net/function.mail>`_ -function. + Sends an email using PHP's native `mail() <http://www.php.net/function.mail>`_ + function. + + .. note:: All that this function does is to use PHP's native ``mail`` + + :: -.. note:: All that this function does is to use PHP's native ``mail``: - | - | mail($recipient, $subject, $message); + mail($recipient, $subject, $message); -For a more robust email solution, see CodeIgniter's :doc:`Email Library -<../libraries/email>`. + For a more robust email solution, see CodeIgniter's :doc:`Email Library + <../libraries/email>`. |