From 1ff03fb29deb9940cbd14b09a089815d0c1ca2e1 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak <alec@alec.pl> Date: Wed, 10 Oct 2012 13:24:52 -0400 Subject: [PATCH] Fix lower-casing email address on replies (#1488598) --- program/include/rcube_shared.inc | 23 +++++++++++++++++++++++ 1 files changed, 23 insertions(+), 0 deletions(-) diff --git a/program/include/rcube_shared.inc b/program/include/rcube_shared.inc index 6767c93..c7461ed 100644 --- a/program/include/rcube_shared.inc +++ b/program/include/rcube_shared.inc @@ -582,6 +582,29 @@ /** + * Format e-mail address + * + * @param string $email E-mail address + * + * @return string Formatted e-mail address + */ +function format_email($email) +{ + $email = trim($email); + $parts = explode('@', $email); + $count = count($parts); + + if ($count > 1) { + $parts[$count-1] = mb_strtolower($parts[$count-1]); + + $email = implode('@', $parts); + } + + return $email; +} + + +/** * mbstring replacement functions */ -- Gitblit v1.9.1