summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source/helpers
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-11-08 14:13:52 +0100
committerAndrey Andreev <narf@bofh.bg>2012-11-08 14:13:52 +0100
commit0898e2395df056f5df90a1dd2d5550f0eae4cd7c (patch)
tree6a20d46c2a06a3c6e00a9b8f08d53ed55b0490b2 /user_guide_src/source/helpers
parente2b0754c4ea3fe227bc80a546f4d5cbd88a1e24e (diff)
Deprecate the Email helper
Diffstat (limited to 'user_guide_src/source/helpers')
-rw-r--r--user_guide_src/source/helpers/email_helper.rst48
1 files changed, 33 insertions, 15 deletions
diff --git a/user_guide_src/source/helpers/email_helper.rst b/user_guide_src/source/helpers/email_helper.rst
index d4e94b1ed..10adf1d0e 100644
--- a/user_guide_src/source/helpers/email_helper.rst
+++ b/user_guide_src/source/helpers/email_helper.rst
@@ -8,6 +8,8 @@ Class <../libraries/email>`.
.. contents:: Page Contents
+.. important:: The Email helper is DEPRECATED.
+
Loading this Helper
===================
@@ -15,21 +17,21 @@ This helper is loaded using the following code::
$this->load->helper('email');
-
The following functions are available:
-valid_email('email')
-====================
+valid_email()
+=============
-Checks if an email is a correctly formatted email. Note that is doesn't
-actually prove the email will recieve mail, simply that it is a validly
-formed address.
+.. php:function:: valid_email($email)
-It returns TRUE/FALSE
+ :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.
- $this->load->helper('email');
+Example::
if (valid_email('email@somesite.com'))
{
@@ -40,10 +42,26 @@ It returns TRUE/FALSE
echo 'email is not valid';
}
-send_email('recipient', 'subject', 'message')
-=============================================
+.. note:: All that this function does is to use PHP's native ``filter_var()``:
+ |
+ | (bool) filter_var($email, FILTER_VALIDATE_EMAIL);
-Sends an email using PHP's native
-`mail() <http://www.php.net/function.mail>`_ function. For a more robust
-email solution, see CodeIgniter's :doc:`Email
-Class <../libraries/email>`.
+send_email()
+============
+
+.. php:function:: send_email($recipient, $subject, $message)
+
+ :param string $recipient: E-mail address
+ :param string $subject: Mail subject
+ :param string $message: Message body
+ :returns: bool
+
+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``:
+ |
+ | mail($recipient, $subject, $message);
+
+For a more robust email solution, see CodeIgniter's :doc:`Email Library
+<../libraries/email>`.