Giter Site home page Giter Site logo

crazy-max / cwsmailbouncehandler Goto Github PK

View Code? Open in Web Editor NEW
40.0 12.0 19.0 766 KB

📬 PHP class to help webmasters handle bounce-back, feedback loop and ARF mails in standard DSN

License: MIT License

PHP 100.00%
php imap eml-files mail bounce pop3 delivery-status-notification feedback-loop arf-mails webmasters-handle-bounce mailbox-service mailbox

cwsmailbouncehandler's Issues

Problem with Yahoo

Hello,

@crazy-max

i have added a zip file with a eml inside.

This mail is not correctly recognized as bounce mail.

Can you please check this an fix the code.

Malformed email can lead to warnings

In MailBounceHandler\Handler:

parseDsnFields() can return null for the 'perRecipient' element of the result array.

This ends in a warning in parseBodySectionMachine() on line 877 because 'perRecipient' is not an array.

problem with imap_open

in class Handler in function openImapRemote line 295

I get some error messages when calling imap_open.

'imap_open(): Couldn't open stream {xxxx.tu-braunschweig.de:993/imap/ssl/validate-cert}INBOX', '/var/www-aaaa/releases/111/vendor/crazy-max/cws-mail-bounce-handler/lib/Cws/MailBounceHandler/Handler.php', 299, array('opts' => '/imap/ssl/validate-cert')

I have already placed the call to openImapRemote in a try catch.

Does it make sense to use a try catch in the openImapRemote function?

2 problems

  1. It is wanted that mails which are not a delivery notification are not deleted even though DeleteProcessMode is set to on.

  2. I would like to use the NeutralProcessMode and delete the mails if necessary and depending on the situation by hand. Is that possible?

traitment of CwsMbhResult

Hi,

Tank you very much for your class but I can't use it.
How to parse the object CwsMbhResult please ?

Thx

Problem processing e-mails

I'm trying to display the number of total mails, but i'm getting this error:

Fatal error: Cannot use object of type CwsMbhResult as array
The line is:

$result = $cwsMbh->processMails();

      echo 'Número de e-mails: '.$result['counter']['total'].'<br>
          Número de e-mails analisados: '.$result['counter']['fetched'].'<br>
          Número de e-mails processados: '.$result['counter']['processed'].'<br>
          Número de e-mails não processados: '.$result['counter']['unprocessed'].'<br>
          Número de e-mails eliminados: '.$result['counter']['deleted'].'<br>
          Número de e-mails movidos: '.$result['counter']['moved'];

What about using composer.json ?

et si on mettait en place un composer.json.

Composer facilite la mise en place et les mises à jour. Il automatise les mises à jour et gère les dépendances.

Je vais proposer une pull request dans ce sens.

@crazy-max : que penses-tu de découpler la classe principale de ses dépendancs avec les class de debug et de dump ? On aurait ainsi une class autonome et chacun pourrait utiliser son débuggeur préféré. Je penses en particulier lors d' une intégration dans symfony.

No way to get mail content and headers?

After Handler->processMails() i did not find any way to get mail headers or content.

This would be very handy when the processed mail has Handler::CAT_UNKNOWN or Handler::CAT_UNRECOGNIZED. We could save the bounced email to DB (or any other source) and later examine it by hand and mark it as soft/hard bounce or to enhance the process and declare new rules.

Is there any way to get the same results without extending your classes? And would you be interested in such Pull request?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.