Quote from: TobyL at Jan 25, 2007, 03:07 AM
1. How dependent is Pommo on Smarty? From a modx integration point of view it would make sense if the templating could be handed over to MODx itself.
The program interface is 100% dependent on Smarty, as all the templates (or the "view" part of an MVC architecture) is contained within smarty template files -- specifically, .tpl files in the themes/default directory. The benefit of this is that the ’logic’ of the application, or rather, the API, is not at all dependent on SMARTY -- and so the program can be used without SMARTY. Further, poMMo uses a logger ($pommo->_logger) which holds errors and messages that occur during program execution. For instance, if you tried adding a subscriber via PommoSubscriber::add(), but the email was a duplicate (already exists as an active subscriber), the function would a) return false .. and b) an error would be inserted into the logger stack stating that a duplicate email was encounter.
When the view is called via the display() function of PommoTemplate, the $pommo->_logger object’s errors & messages are assigned to a template variable. They can just as well be piped to the MODx template. Here’s how pommo instantiates its view;
/**********************************
INITIALIZATION METHODS
*********************************/
require('../../bootstrap.php');
$pommo->init();
$logger = & $pommo->_logger;
$dbo = & $pommo->_dbo;
/**********************************
SETUP TEMPLATE, PAGE
*********************************/
Pommo::requireOnce($pommo->_baseDir.'inc/classes/template.php');
$smarty = new PommoTemplate();
....more application logic....
$smarty->display('admin/subscribers/admin_subscribers.tpl');
Pommo::kill();
2. I see you are using phpmailer. MODx currently ships with phpmailer but development of phpmailer seems to be stagnated. Any thoughts on that?
poMMo uses a slightly modified version of phpMailer so that it can keep track of the bytes sent so that BPS can be throttled. I could (and should) migrate this functionality to within the personalization functions and use the stock version, as I’m not entirely happy w/ the quality of implementation. As for development ceasing on phpMailer.. this is something I’m not too worried about, as Brad is still alive & responsive
-- there’s just been no major security issues or bugs found for some time.. and the platform is feature complete and working.
As for swiftmailer, this looks very nice. Thank you for bringing it to my attention. I like the fact that it handles multiple redundant SMTP connections.. and would certainly not be opposed to integrating it. I could basically drop all my (now) kludgey multiple SMTP support in favor of using swiftmailer’s internal redundant relays + load balancing.
Besides... my mailing class BADLY needs to be re-written
EDIT : After further researching Swift Mailer, I’ll certainly be switching to it. Hopefully v3.0 comes out in time for the PR15 release.
Hope this helps,
~ Brice