diff options
Diffstat (limited to 'system/helpers/email_helper.php')
-rw-r--r-- | system/helpers/email_helper.php | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/system/helpers/email_helper.php b/system/helpers/email_helper.php index b44fae554..e677afd28 100644 --- a/system/helpers/email_helper.php +++ b/system/helpers/email_helper.php @@ -33,9 +33,12 @@ * @access public
* @return bool
*/
-function valid_email($address)
+if (! function_exists('valid_email'))
{
- return ( ! preg_match("/^([a-z0-9\+_\-]+)(\.[a-z0-9\+_\-]+)*@([a-z0-9\-]+\.)+[a-z]{2,6}$/ix", $address)) ? FALSE : TRUE;
+ function valid_email($address)
+ {
+ return ( ! preg_match("/^([a-z0-9\+_\-]+)(\.[a-z0-9\+_\-]+)*@([a-z0-9\-]+\.)+[a-z]{2,6}$/ix", $address)) ? FALSE : TRUE;
+ }
}
// ------------------------------------------------------------------------
@@ -46,9 +49,12 @@ function valid_email($address) * @access public
* @return bool
*/
-function send_email($recipient, $subject = 'Test email', $message = 'Hello World')
+if (! function_exists('send_email'))
{
- return mail($recipient, $subject, $message);
+ function send_email($recipient, $subject = 'Test email', $message = 'Hello World')
+ {
+ return mail($recipient, $subject, $message);
+ }
}
?>
\ No newline at end of file |