From b8c283a695c8074a57d8c3dfa00934312638931d Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Fri, 19 Jul 2013 16:02:53 -0700 Subject: Dropping unecessary php: directive to function definitions in user guide --- user_guide_src/source/helpers/email_helper.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'user_guide_src/source/helpers/email_helper.rst') diff --git a/user_guide_src/source/helpers/email_helper.rst b/user_guide_src/source/helpers/email_helper.rst index 10adf1d0e..b38e7ec46 100644 --- a/user_guide_src/source/helpers/email_helper.rst +++ b/user_guide_src/source/helpers/email_helper.rst @@ -22,7 +22,7 @@ The following functions are available: valid_email() ============= -.. php:function:: valid_email($email) +.. function:: valid_email($email) :param string $email: Email address :returns: bool @@ -49,7 +49,7 @@ Example:: send_email() ============ -.. php:function:: send_email($recipient, $subject, $message) +.. function:: send_email($recipient, $subject, $message) :param string $recipient: E-mail address :param string $subject: Mail subject -- cgit v1.2.3-24-g4f1b From c43dc1e6b34104c4c060f2e0fc07ea61cabbf6c1 Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Sun, 21 Jul 2013 11:00:38 -0700 Subject: Update Email helper docs --- user_guide_src/source/helpers/email_helper.rst | 62 ++++++++++++++------------ 1 file changed, 34 insertions(+), 28 deletions(-) (limited to 'user_guide_src/source/helpers/email_helper.rst') 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 + +
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() `_ -function. + Sends an email using PHP's native `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>`. -- cgit v1.2.3-24-g4f1b From 3de130c2da3b93a3404f264e92d7b65354de3548 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 7 Feb 2014 23:31:49 +0200 Subject: [ci skip] Add return types to helper docs (+ some other formatting) --- user_guide_src/source/helpers/email_helper.rst | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'user_guide_src/source/helpers/email_helper.rst') diff --git a/user_guide_src/source/helpers/email_helper.rst b/user_guide_src/source/helpers/email_helper.rst index fe3ccdda1..b665ce548 100644 --- a/user_guide_src/source/helpers/email_helper.rst +++ b/user_guide_src/source/helpers/email_helper.rst @@ -30,8 +30,9 @@ The following functions are available: .. function:: valid_email($email) - :param string $email: Email address - :returns: bool + :param string $email: E-mail address + :returns: TRUE if a valid email is supplied, FALSE otherwise + :rtype: 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 @@ -52,13 +53,13 @@ The following functions are available: (bool) filter_var($email, FILTER_VALIDATE_EMAIL); - .. function:: send_email($recipient, $subject, $message) :param string $recipient: E-mail address :param string $subject: Mail subject :param string $message: Message body - :returns: bool + :returns: TRUE if the mail was successfully sent, FALSE in case of an error + :rtype: bool Sends an email using PHP's native `mail() `_ function. @@ -70,4 +71,4 @@ The following functions are available: mail($recipient, $subject, $message); For a more robust email solution, see CodeIgniter's :doc:`Email Library - <../libraries/email>`. + <../libraries/email>`. \ No newline at end of file -- cgit v1.2.3-24-g4f1b