summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source/helpers/email_helper.rst
diff options
context:
space:
mode:
authorEric Barnes <eric@ericlbarnes.com>2011-11-27 06:30:22 +0100
committerEric Barnes <eric@ericlbarnes.com>2011-11-27 06:30:22 +0100
commit7e66dda705743cbfe1d522ddb73e5694006ec42c (patch)
treec08b63deb28c09ec49d9173280f1ca234debfe50 /user_guide_src/source/helpers/email_helper.rst
parent7eceb03f083643254c7393c6b5ebe539e344a1ba (diff)
parente101593561a10632c1d63180436b19f1d7115046 (diff)
Merge branch 'refs/heads/develop' into feature/unit-tests
Conflicts: user_guide/helpers/number_helper.html
Diffstat (limited to 'user_guide_src/source/helpers/email_helper.rst')
-rw-r--r--user_guide_src/source/helpers/email_helper.rst49
1 files changed, 49 insertions, 0 deletions
diff --git a/user_guide_src/source/helpers/email_helper.rst b/user_guide_src/source/helpers/email_helper.rst
new file mode 100644
index 000000000..d4e94b1ed
--- /dev/null
+++ b/user_guide_src/source/helpers/email_helper.rst
@@ -0,0 +1,49 @@
+############
+Email Helper
+############
+
+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
+
+Loading this Helper
+===================
+
+This helper is loaded using the following code::
+
+ $this->load->helper('email');
+
+
+The following functions are available:
+
+valid_email('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.
+
+It returns TRUE/FALSE
+
+::
+
+ $this->load->helper('email');
+
+ if (valid_email('email@somesite.com'))
+ {
+ echo 'email is valid';
+ }
+ else
+ {
+ echo 'email is not valid';
+ }
+
+send_email('recipient', 'subject', 'message')
+=============================================
+
+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>`.