blob: d4e94b1ed4d6d2964da22eb7f037f505ab69c7ea [file] [log] [blame]
Derek Jones8ede1a22011-10-05 13:34:52 -05001############
2Email Helper
3############
4
5The Email Helper provides some assistive functions for working with
6Email. For a more robust email solution, see CodeIgniter's :doc:`Email
7Class <../libraries/email>`.
8
9.. contents:: Page Contents
10
11Loading this Helper
12===================
13
14This helper is loaded using the following code::
15
16 $this->load->helper('email');
17
18
19The following functions are available:
20
21valid_email('email')
22====================
23
24Checks if an email is a correctly formatted email. Note that is doesn't
25actually prove the email will recieve mail, simply that it is a validly
26formed address.
27
28It returns TRUE/FALSE
29
30::
31
32 $this->load->helper('email');
33
34 if (valid_email('email@somesite.com'))
35 {
36 echo 'email is valid';
37 }
38 else
39 {
40 echo 'email is not valid';
41 }
42
43send_email('recipient', 'subject', 'message')
44=============================================
45
46Sends an email using PHP's native
47`mail() <http://www.php.net/function.mail>`_ function. For a more robust
48email solution, see CodeIgniter's :doc:`Email
49Class <../libraries/email>`.