Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion inc/libs/php-bounce/class.phpmailer-bmh.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@

if (version_compare(PHP_VERSION, '8.0.0', '<=') ) { exit("Sorry, this version of Bounce Mail Handler will only run on PHP version 8.0.0 or greater!\n"); }

require_once(BEA_SENDER_DIR . '/inc/libs/php-bounce/' . 'phpmailer-bmh_rules.php');
require_once(BEA_SENDER_DIR . '/inc/libs/php-bounce/phpmailer-bmh_rules.php');
class PHPMailerBMH {

/* CONSTANTS */
Expand Down
20 changes: 8 additions & 12 deletions inc/utils/class.bounce.email.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

use codeworxtech\PHPMailerBMH\PHPMailerBMH;

class Bea_Sender_BounceEmail {

private $bmh;
Expand All @@ -14,7 +16,7 @@ class Bea_Sender_BounceEmail {
private $log;

public function __construct() {
$this->bmh = new BounceMailHandler();
$this->bmh = new PHPMailerBMH();
$this->log = new Bea_Log( WP_CONTENT_DIR.'/bea-sender-bounce-cron' );
}

Expand Down Expand Up @@ -64,15 +66,15 @@ public function bounce_init() {
// BHM setup
$this->bmh->mailhost = $host['mailhost'];
// your mail server
$this->bmh->mailbox_username = $host['mailbox_username'];
$this->bmh->mailboxUserName = $host['mailbox_username'];
// your mailbox username
$this->bmh->mailbox_password = $host['mailbox_password'];
$this->bmh->mailboxPassword = $host['mailbox_password'];
// your mailbox password
$this->bmh->port = $host['port'];
// the port to access your mailbox, default is 143
$this->bmh->service = $host['service'];
// the service to use (imap or pop3), default is 'imap'
$this->bmh->service_option = $host['service_option'];
$this->bmh->serviceOption = $host['service_option'];
// the service options (none, tls, notls, ssl, etc.), default is 'notls'
$this->bmh->boxname = $host['boxname'];
// the mailbox to access, default is 'INBOX'
Expand All @@ -90,21 +92,15 @@ public function bounce_init() {
// Log
$this->log->log_this( 'Open the mailbox' );

$this->bmh->openMailbox();
$this->bmh->action_function = array(
$this->bmh->MailboxOpen();
$this->bmh->actionFunction = array(
$this,
'callback_action'
);

$this->log->log_this( 'Process mailbox' );
$this->bmh->processMailbox();


$this->log->log_this( 'Delete mailbox' );
// Delete flag and do global deletes if true
$this->bmh->globalDelete();


$this->log->log_this( 'Process end' );
// Unlock the file
self::unlock();
Expand Down