summaryrefslogtreecommitdiffstats
path: root/system/helpers/email_helper.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-06-07 20:56:59 +0200
committerAndrey Andreev <narf@bofh.bg>2012-06-07 20:56:59 +0200
commitcd221aba73cb7a117c70ca237f0ee9dc14f80cf1 (patch)
tree39db53d645226c212eb697494320eef6302544a0 /system/helpers/email_helper.php
parent1fcce9667fe8d1925a36549e22124411f5828230 (diff)
parent6c776538c4e8f1b932d5ec7431c1c8de8a5642a6 (diff)
Merge upstream branch
Diffstat (limited to 'system/helpers/email_helper.php')
-rw-r--r--system/helpers/email_helper.php28
1 files changed, 14 insertions, 14 deletions
diff --git a/system/helpers/email_helper.php b/system/helpers/email_helper.php
index 497625c10..0516e938a 100644
--- a/system/helpers/email_helper.php
+++ b/system/helpers/email_helper.php
@@ -37,14 +37,14 @@
// ------------------------------------------------------------------------
-/**
- * Validate email address
- *
- * @param string
- * @return bool
- */
if ( ! function_exists('valid_email'))
{
+ /**
+ * Validate email address
+ *
+ * @param string
+ * @return bool
+ */
function valid_email($address)
{
return (bool) preg_match('/^([a-z0-9\+_\-]+)(\.[a-z0-9\+_\-]+)*@([a-z0-9\-]+\.)+[a-z]{2,6}$/ix', $address);
@@ -53,16 +53,16 @@ if ( ! function_exists('valid_email'))
// ------------------------------------------------------------------------
-/**
- * Send an email
- *
- * @param string
- * @param string
- * @param string
- * @return bool
- */
if ( ! function_exists('send_email'))
{
+ /**
+ * Send an email
+ *
+ * @param string
+ * @param string
+ * @param string
+ * @return bool
+ */
function send_email($recipient, $subject = 'Test email', $message = 'Hello World')
{
return mail($recipient, $subject, $message);