Skip to content

Latest commit

 

History

History
91 lines (63 loc) · 2.92 KB

README.md

File metadata and controls

91 lines (63 loc) · 2.92 KB

DDSTATE

DD_J_acyMailing_Connector

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..

alt text

GPL Licence

Features

  • checkListSubscription()
  • setTemplate()
  • addMail()
  • ...

Get it into acyMailing Core

We did informed AcyMailing with very positive feedback about these solution to get it into acyMailing Core.

Information about further developement

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


Using example

$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;
}

Hack for multiple subscribers within one mailid

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` )


System requirements

AcyMailing 5.10.4 or newer
PHP 5.6.13 or newer

DD_ Namespace

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