Changeset:
623ac079a12d
https://sourceforge.net/p/mrbs/hg-code/ci/623ac079a12db2b219b488f1b8d266857ff03f50
Author:
Campbell Morrison <[email protected]>
Date:
Mon May 09 07:15:04 2016 +0100
Log message:
Fixed validation of email addresses to allow for addresses that include a
display name
diffstat:
web/functions_mail.inc | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diffs (14 lines):
diff -r 615bba812c51 -r 623ac079a12d web/functions_mail.inc
--- a/web/functions_mail.inc Mon Apr 25 16:15:30 2016 +0100
+++ b/web/functions_mail.inc Mon May 09 07:15:04 2016 +0100
@@ -185,7 +185,9 @@
$array[$i] = trim($array[$i]);
if ($array[$i] !== '')
{
- if (!validate_email($array[$i]))
+ $mailer = new PHPMailer;
+ // Use parseAddresses() to validate the address because it could contain
a display name
+ if (count($mailer->parseAddresses($array[$i])) == 0)
{
$message = 'Invalid email address "' . $array[$i] . '"';
mail_debug($message);
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits