Bounce Mail Handler for PHP | This is a "reboot" of PHPMailer-BMH from WorxWare.

Related tags

Email PHPMailer-BMH
Overview

Build Status codecov.io Scrutinizer Code Quality Codacy Badge SensioLabsInsight Latest Stable Version Total Downloads Latest Unstable Version License

  • PHP 7.0+ Support
  • Composer & PSR-0 Support
  • PHPUnit testing via Travis CI (TODO: more tests needed)
  • PHP-Quality testing via SensioLabsInsight (TODO: more fixes needed)

Bounce Mail Handler

WARNING: This is a Extended-Fork of instaclick's PHPMailer-BMH what is on the other hand a Fork of WorxWare's PHPMailer-BMH.

Installation

The recommended installation way is through Composer.

$ composer require voku/bounce-mail-handler

Examples

github.com/voku/PHPMailer-BMH/tree/master/examples

Comments
  • Custom rules

    Custom rules

    One more question, Is it possible to make support custom rules? Like a callback function? maybe callback in function:

    public function processBounce($pos, $type, $totalFetched);
    

    I use composer, and I would like to work with standard rules and had the opportunity to add your own Tnx.

    opened by sedovserge 3
  • Minor adjustments

    Minor adjustments

    Good morning,

    We are providing some minor corrections that we have found useful in our systems.

    1 - Adding the calls to the functions imap_errors() and imap_alerts() before all thecalls to the function imap_close(). They were originating warnings in our systems.

    More information http://php.net/manual/en/function.imap-alerts.php http://php.net/manual/en/function.imap-errors.php

    2 - Correcting a fatal error originated by passing a wrongly formatted date in the $this->deleteMsgDate parameter.

    3 - Correcting another fatal error on preg_match() when $heades is void.

    We hope you find these fixes useful so they can be added to the master repository.

    Francesc X Escarmís Clickedu Team


    This change is Reviewable

    opened by clickedu-fxescarmis 2
  • Fixed warning

    Fixed warning "imap_header(): Bad message number" in the case of moving messages

    If I set move* flags in true (moveSoft and moveHard) and I have more than one message in INBOX than I have PHP warning (after calling processMailbox()):

    PHP Warning 'yii\base\ErrorException' with message 'imap_header(): Bad message number' in /app/vendor/voku/bounce-mail-handler/src/BounceMailHandler/BounceMailHandler.php:691

    Stack trace: #0 /app/vendor/voku/bounce-mail-handler/src/BounceMailHandler/BounceMailHandler.php(536): BounceMailHandler\BounceMailHandler->processBounce()

    The function is stopped in spite of the fact that this warning. So, it brings inconvenience. I tried to solve the problem.


    This change is Reviewable

    opened by ezoterik 2
  • Fix rule 124

    Fix rule 124

    Add in rules $result['email'] = $match[1]; In callback function param $email is empty without this line

    elseif (preg_match("/<(\S+@\S+\w)>.*\n.*mailbox unavailable/i", $body, $match)) {
        $result['rule_cat'] = 'unknown';
        $result['rule_no'] = '124';
        /* HERE */
        $result['email'] = $match[1];
      }
    
    opened by sedovserge 2
  • Added Gmail Bounce Support To BodyRules

    Added Gmail Bounce Support To BodyRules

    Added Gmail bounce support to BodyRules. I have tested in my development environment and found no issues, I also tested the regex expression with an online tool against multiple types of bounced emails all from Gmail and the regex has passed for all the emails.


    This change is Reviewable

    opened by JPPreusDev 2
  • Error in mail parsing

    Error in mail parsing

    Hello, There is an issue in email parsing. The regexp in line 492 from file : voku/bounce-mail-handler/src/BounceMailHandler/phpmailer-bmh_rules.php is not correct for specific bounces.

    The following body is detected as an unrecognized bounce :

    This is the mail system at host smtp1.yyyyyyyyy.net.
    
    I'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below.
    
    For further assistance, please send mail to postmaster.
    
    If you do so, please include this problem report. You can delete your own text from the attached returned message.
    
                       The mail system
    
    <[[email protected]](mailto:[email protected])>: host mx.usgpeople.fr[IP] said: 550
        #5.1.0 Address rejected. (in reply to RCPT TO command)
    

    but the following (quite similar) body is detected as rule '0048' :

    This is the mail system at host smtp2.yyyyyyyyy.net.
    
    I'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below.
    
    For further assistance, please send mail to postmaster.
    
    If you do so, please include this problem report. You can delete your own text from the attached returned message.
    
                       The mail system
    
    <[[email protected]](mailto:[email protected])>: host mx.usgpeople.fr[IP] said:
        550 #5.1.0 Address rejected. (in reply to RCPT TO command)
    

    The 550 code is not on the same line in the two examples.

    Can you fix the regex, please ? Maybe apply regex on body without carriage return ?

    Thanks for your return,

    Gildas BILLARD

    opened by gbillard-seres 1
  • Rule broken

    Rule broken

    In phpmailer-bmh_rules.php line 1552:
                                                                                                            
      Warning: preg_match(): Compilation failed: quantifier does not follow a repeatable item at offset 74  
                                                                                                            
    

    The line in question includes the email address in a preg_match. I suppose, it would need proper regex escaping...

    elseif (preg_match("/Delivery to the following recipients failed.*\n.*\n.*" . $result['email'] . '/i', $dsn_msg)) {

    opened by NerdyProjects 1
  • Ability to use mailboxLink in derived classes

    Ability to use mailboxLink in derived classes

    Changed visibility of $mailboxLink to be able to interact with mailbox after processing an email. For example if you want an other moving behavior


    This change is Reviewable

    opened by ItsReddi 1
  • And new rule

    And new rule

    :) Please add one new variation of 0236 rule

    /*
       * rule: unknown
       * sample:
       * <[email protected]>: host mail-host[111.111.111.111]
        said: 550 5.1.1 This user does not exist
       */
      elseif (preg_match("/user.+?not\s+exist/i", $body, $match)) {
        $result['rule_cat'] = 'unknown';
        $result['rule_no'] = '0236';
      }
    
    opened by sedovserge 1
  • Removing space on folder lookup

    Removing space on folder lookup

    Hey Found a little Bug if you use it with imap an moving true. in line

    if (trim($mailbox) == '' || strpos($mailbox, ' INBOX.') === false) {
    

    The space before INBOX results in a error, because it shouldnt be there.

    opened by ItsReddi 1
  • Mail not filtered

    Mail not filtered

    opened by gbillard-seres 0
  • Cannot create imap connection

    Cannot create imap connection

    hello, i have the following problem, i can't connect with smpt from google. I am using the following configuration:

    $bmh->mailhost = 'smtp.gmail.com'; $bmh->mailboxUserName = 'username'; without @gmail.com $bmh->mailboxPassword = '*****'; $bmh->port = 465; $bmh->service = 'imap'; $bmh->serviceOption = 'ssl/novalidate-cert'; $bmh->boxname = 'INBOX';

    I'm using index.php

    and I get the following error

    Cannot create imap connection to smtp.gmail.com Error MSG: [CLOSED] IMAP connection broken (server response)

    if you can help me!! Thank you!!

    opened by eber22407 1
  • More strict php dependency

    More strict php dependency

    Hi folks, as we learned from https://github.com/voku/PHPMailer-BMH/issues/16#issuecomment-961776350, It's extremely risky to depend on "php": ">=7.0.0" since there may be changes in future php versions that (once again) stop this lib from working although composer says that it works with the installed php version.

    I suggest "php": "^7.0|^8.0" (adding the 8.0 assuming https://github.com/voku/PHPMailer-BMH/pull/17 has been merged by the time this issue is viewed).

    Great work guys, keep it up :-)

    opened by siemendev 1
  • Configure WhiteSource Bolt for GitHub

    Configure WhiteSource Bolt for GitHub

    Welcome to WhiteSource Bolt for GitHub! This is an onboarding PR to help you understand and configure settings before WhiteSource starts scanning your repository for security vulnerabilities.

    :vertical_traffic_light: WhiteSource Bolt for GitHub will start scanning your repository only once you merge this Pull Request. To disable WhiteSource Bolt for GitHub, simply close this Pull Request.


    What to Expect

    This PR contains a '.whitesource' configuration file which can be customized to your needs. If no changes were applied to this file, WhiteSource Bolt for GitHub will use the default configuration.

    Before merging this PR, Make sure the Issues tab is enabled. Once you merge this PR, WhiteSource Bolt for GitHub will scan your repository and create a GitHub Issue for every vulnerability detected in your repository.

    If you do not want a GitHub Issue to be created for each detected vulnerability, you can edit the '.whitesource' file and set the 'minSeverityLevel' parameter to 'NONE'.


    :question: Got questions? Check out WhiteSource Bolt for GitHub docs. If you need any further assistance then you can also request help here.


    This change is Reviewable

    opened by mend-bolt-for-github[bot] 0
Owner
Lars Moelleken
Webdeveloper & Sysadmin | egrep '#php|#js|#html|#css|#sass'
Lars Moelleken
Simple mail sending by PHPMailer and Create your local system.

Simple mail sending by PHPMailer and Create your local system. Send mail zero of cost and also send Attachment like Photo, pdf and multiple files. You should be create a login and verify two steps authentication like OTP, verifications ?? link. PHPMailer make your dreams project eassy and simple also free of cost.

SUSHIL KUMBHAR 2 Dec 8, 2021
A mail driver to quickly preview mail

A mail driver to quickly preview mail This package can display a small overlay whenever a mail is sent. The overlay contains a link to the mail that w

Spatie 1k Jan 4, 2023
A Laravel package to check if you can send e-mail through a given mailserver in name of a given e-mail address

A Laravel package to check if you can send e-mail through a given mailserver in name of a given e-mail address Mail spf checker A Laravel package to c

Dieter Coopman 110 Dec 16, 2022
PHPMailer – A full-featured email creation and transfer class for PHP

PHPMailer – A full-featured email creation and transfer class for PHP Features Probably the world's most popular code for sending email from PHP! Used

PHPMailer 19.1k Jan 2, 2023
A ready-to-use PHP script for sending Emails with an HTML Template will use a Gmail account as the sender and you will not need any email server. Powered by PHPMailer.

Gmail Email Sender by PHP A ready-to-use PHP script for sending Emails with an HTML Template will use a Gmail account as the sender and you will not n

Max Base 4 Oct 29, 2022
This application (class) does the sending of emails used in the phpmailer library

emailsender - PHP Notification library via email using phpMailer This library has the function of sending email using the phpmailer library. Doing thi

Lucas Alcantara Rodrigues Volpati 1 Feb 9, 2022
PHPMailer-VerficationCode App

the App PHPMailer-VerficationCode App Steps To use it: install Xampp or Wampp Server copy and extlact the cloned project into htdocs in xammp Import .

Dominique Rwema Bagirishya 13 Jul 21, 2022
Crud PHP 8 com Form E-mail

Crud com PHP 8 PDO Login - Cadastro de Usuários - Edição - Deleção - Adição | Formulário envio de e-mail Para rodar o Crud é preciso instalar um servi

Isaias Oliveira 4 Nov 16, 2021
:envelope: E-Mail Address Validator (syntax, dns, trash, typo)

✉️ E-Mail Address Validator for PHP Warning The best way to validate an e-mail address is still to send a duplicate opt-in-mail, when the user clicks

Lars Moelleken 41 Dec 25, 2022
Mail sending module for Mezzio and Laminas MVC with support for file attachment and template email composition

This module provides an easy and flexible way to send emails from Mezzio and Laminas MVC applications (formerly known as Zend Expressive and Zend MVC). It allows you to pre-configure emails and transports, and then send those emails at runtime.

null 82 Jan 16, 2022
Laravel Mail Credentials switcher for Budget Laravel Applications

Laravel Mail Switcher Laravel Mail Credentials Switcher is a library which helps you to: Manage your Mail Service Credentials Configure the Laravel's

(Seth) Phat Tran 34 Dec 24, 2022
PostfixAdmin - web based virtual user administration interface for Postfix mail servers

PostfixAdmin An open source, web based interface for managing domains/mailboxes/aliases etc on a Postfix based mail server.

PostfixAdmin 755 Jan 3, 2023
Laravel Mail Catcher Driver

Laravel Mail Catcher Driver This package include a new mailbase driver which will catch all the sent emails and save it to the database. It then expos

Tauqeer Liaqat 94 Aug 30, 2022
💌 Mail app for Nextcloud

Nextcloud Mail ?? A mail app for Nextcloud Why is this so awesome? ?? Integration with other Nextcloud apps! Currently Contacts, Calendar & Files – mo

Nextcloud 684 Dec 26, 2022
Mail Web is a Laravel package which catches emails locally for debugging

Mail Web is a Laravel package which catches emails locally for debugging Installation Use the package manager composer to install Mail Web. composer r

Appoly 64 Dec 24, 2022
A testing package for intercepting mail sent from Laravel

Laravel Mail Intercept A testing package for intercepting mail sent from Laravel This testing suite intercepts Laravel Mail just before they are sent

Kirschbaum Development Group, LLC 91 Oct 18, 2022
Mail application developed with Symfony 5

Fakey-Mail Mail application developed with Symfony 5! Check out the requirements for info on how to launch the app. Check out the basic functionality

Mauro 2 Jun 21, 2022
✉️ Laravel Mail Explorer

Mailbook Mailbook is a Laravel package that lets you easily inspect your mails without having to actually trigger it in your application. View demo In

Max Hoogenbosch 88 Dec 29, 2022
Mail Api for fetch or send mails

flux-mail-api Mail Api for fetch or send mails Installation Native Download RUN (mkdir -p /%path%/libs/flux-mail-api && cd /%path%/libs/flux-mail-api

null 2 Dec 12, 2022