if (!isset($pommo->_session['personalization'])) { $pommo->_session['personalization'] = FALSE; $matches1 = array(); $matches2 = array(); $matches3 = array(); preg_match('/\\[\\[[^\\]]+]]/', $mailing->_mailing['body'], $matches1); preg_match('/\\[\\[[^\\]]+]]/', $mailing->_mailing['altbody'], $matches2); preg_match('/\\[\\[[^\\]]+]]/', $mailing->_mailing['subject'], $matches3); if (!empty($matches1) || !empty($matches2) || !empty($matches3)) { $pommo->_session['personalization'] = TRUE; } // cache personalizations in session if ($pommo->_session['personalization']) { $pommo->_session['personalization_body'] = PommoHelperPersonalize::search($mailing->_mailing['body']); $pommo->_session['personalization_altbody'] = PommoHelperPersonalize::search($mailing->_mailing['altbody']); $pommo->_session['personalization_subject'] = PommoHelperPersonalizeTitle::search($mailing->_mailing['subject']); } } /********************************** * PREPARE THE MAILER *********************************/ $html = $mailing->_mailing['ishtml'] == 'on' ? TRUE : FALSE; $mailer = new PommoMailer($mailing->_mailing['fromname'], $mailing->_mailing['fromemail'], $mailing->_mailing['frombounce'], $config['list_exchanger'], NULL, $mailing->_mailing['charset'], $pommo->_session['personalization']); if (!$mailer->prepareMail($mailing->_mailing['subject'], $mailing->_mailing['body'], $html, $mailing->_mailing['altbody'])) { $mailer->shutdown('*** ERROR *** prepareMail() returned errors.'); } // Set appropriate SMTP relay if ($config['list_exchanger'] == 'smtp') { $mailer->setRelay(unserialize($config['smtp_1'])); //$mailer->setRelay($config['smtp_' . $relayID]); /* PR15: depricated */ $mailer->SMTPKeepAlive = TRUE;
$matches1 = array(); preg_match('/\\[\\[[^\\]]+]]/', $input['body'], $matches1); if (!empty($matches1)) { $pBody = PommoHelperPersonalize::search($input['body']); $input['body'] = PommoHelperPersonalize::replace($input['body'], $subscriber, $pBody); } $matches2 = array(); preg_match('/\\[\\[[^\\]]+]]/', $input['altbody'], $matches2); if (!empty($matches2)) { $pAltBody = PommoHelperPersonalize::search($input['altbody']); $input['altbody'] = PommoHelperPersonalize::replace($input['altbody'], $subscriber, $pAltBody); } $matches3 = array(); preg_match('/\\[\\[[^\\]]+]]/', $input['subject'], $matches3); if (!empty($matches3)) { $pSubject = PommoHelperPersonalizeTitle::search($input['subject']); $input['subject'] = PommoHelperPersonalizeTitle::replace($input['subject'], $subscriber, $pSubject); } } $smarty->assign($input); $smarty->display('inc/mailing.tpl'); Pommo::kill(); } } /********************************** VALIDATION ROUTINES *********************************/ if (!is_numeric($state['limit']) || $state['limit'] < 10 || $state['limit'] > 200) { $state['limit'] = 100; } if ($state['order'] != 'asc' && $state['order'] != 'desc') {