A class, build for Joomla to connect you extension to acyMailing. It allows to check subscriptions, let you push your notifications into acymailing and huge more..
- checkListSubscription()
- setTemplate()
- addMail()
- ...
We did informed AcyMailing with very positive feedback about these solution to get it into acyMailing Core.
We will now wait and hope for acyMailing implementation to see if more time is needed to spend on that.
Note: It is even in ALPHA state
$AcyMailingConnector = new AcyMailingConnector();
$AcyMailingConnector->ignoreSubscription = true;
// The E-Mail template you created in acyMailing, including placeholder like {title}, {name}, etc.
// which you want to dynamically replace with the notification in the addMail() methode (see below)
$AcyMailingConnector->setTemplate(20);
for($i=0; $i<count($myNotications); $i++) {
if(!$AcyMailingConnector->checkListSubscription([$i]['id'], 6)){
$this->setError($myNotications[$i]['email'] . ' Not to list subscribed');
continue;
}
$search = array('{title}', '{name}', '{lastname}', '{messagebody}', '{senddate}', '{link}');
$replace = array(
$myNotications[$i]['title'],
$myNotications[$i]['name'],
$myNotications[$i]['lastname'],
$myNotications[$i]['messagebody'],
date('d.m.Y', strtotime($myNotications[$i]['senddate'])),
$backlink
);
if(!$AcyMailingConnector->addMail($user_data[$i]['id'], 6, $search, $replace)){
$errors[] = $user_data[$i]['email'];
}
}
if (!empty($errors)) {
$this->setError('Email could not be sent to the following addresses: ' . implode(', ', $errors));
return false;
}
To run multiple subscribers within one mailid, it is necessary to make a change to the #__acymailing_queue table?
sql ALTER TABLE `#__acymailing_queue` DROP PRIMARY KEY , ADD PRIMARY KEY ( `mailid` )
AcyMailing 5.10.4 or newer
PHP 5.6.13 or newer
DD_ stands for Didldu a.k.a | HR-IT-Solutions GmbH (Brand recognition)
It is a namespace prefix, provided to avoid element name conflicts.
Author: HR-IT-Solutions GmbH Florian Häusler https://www.hr-it-solution.com
Copyright: (C) 2019 - 2019 HR-IT-Solutions GmbH >> Adapted from Joomla! plg_search_content
http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only