Skip to content
Permalink
Browse files

Improve matching of email addresses within a bounce

  • Loading branch information...
bramley authored and samtuke committed Aug 4, 2019
1 parent 96df24d commit 1c3c96364fcb88c8f38cae0103dc68593c96fb2f
Showing with 15 additions and 16 deletions.
  1. +15 −16 public_html/lists/admin/processbounces.php
@@ -142,10 +142,9 @@ function findUserID($text)
//# that should not be too bad
if (!$userid) {
preg_match_all('/[\S]+@[\S\.]+/', $text, $regs);
preg_match_all('/[._a-zA-Z0-9-]+@[.a-zA-Z0-9-]+/', $text, $regs);
foreach ($regs[0] as $match) {
$email = cleanEmail($match);
foreach ($regs[0] as $email) {
$useridQ = Sql_Fetch_Row_Query(sprintf('select id from %s where email = "%s"', $tables['user'],
sql_escape($email)));
if (!empty($useridQ[0])) {
@@ -236,19 +235,19 @@ function processBounceData($bounceid, $msgid, $userid, $bounceDate = null)
$userid, $bounceid));
#Use the date of the bounce, instead of "now" as processing may be different
Sql_Query(sprintf('INSERT INTO %s
(
user,
message,
bounce,
time
)
VALUES
(
%d,
-1,
%d,
%s
Sql_Query(sprintf('INSERT INTO %s
(
user,
message,
bounce,
time
)
VALUES
(
%d,
-1,
%d,
%s
)',
$tables['user_message_bounce'],
$userid, $bounceid, $bounceDate)

0 comments on commit 1c3c963

Please sign in to comment.
You can’t perform that action at this time.