Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicates removal #40

Open
Pascal76 opened this issue Mar 29, 2020 · 0 comments
Open

Duplicates removal #40

Pascal76 opened this issue Mar 29, 2020 · 0 comments

Comments

@Pascal76
Copy link

There may be duplicates on results:

Ex: from:

ARC-Authentication-Results: i=1; mx.google.com;
dkim=pass [email protected] header.s=splio header.b=dMrDDDOG;
dkim=pass [email protected] header.s=dkim02 header.b=SfWG7Lbo;
spf=pass (google.com: domain of [email protected] designates 91.190.168.87 as permitted sender) smtp.mailfrom=[email protected];
dmarc=pass (p=QUARANTINE sp=REJECT dis=NONE) header.from=newsletter.3suisses.fr
...
Authentication-Results: mx.google.com;
dkim=pass [email protected] header.s=splio header.b=dMrDDDOG;
dkim=pass [email protected] header.s=dkim02 header.b=SfWG7Lbo;
spf=pass (google.com: domain of [email protected] designates 91.190.168.87 as permitted sender) smtp.mailfrom=[email protected];
dmarc=pass (p=QUARANTINE sp=REJECT dis=NONE) header.from=newsletter.3suisses.fr

=> I suggest this to remove them:
return array_map('unserialize',array_unique(array_map('serialize',$results)));

  • I also suggest this to remove first/last parenthesis on reasons:
    'reason' => isset($m[7]) ? preg_replace("/^((.+))$/","$1",preg_replace("/\r?\n/",'',$m[7][0])) : '',
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant