<?php /* Reminder: always indent with 4 spaces (no tabs). */ // +---------------------------------------------------------------------------+ // | Timer Example | // +---------------------------------------------------------------------------+ // | index.php | // | | // | Public plugin page | // +---------------------------------------------------------------------------+ // | Copyright (C) 2009 by the following authors: | // | | // | Authors: suprsidr - suprsidr AT flashyourweb DOT com | // +---------------------------------------------------------------------------+ // | Created with the Geeklog Plugin Toolkit. | // +---------------------------------------------------------------------------+ // | | // | This program is free software; you can redistribute it and/or | // | modify it under the terms of the GNU General Public License | // | as published by the Free Software Foundation; either version 2 | // | of the License, or (at your option) any later version. | // | | // | This program is distributed in the hope that it will be useful, | // | but WITHOUT ANY WARRANTY; without even the implied warranty of | // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | // | GNU General Public License for more details. | // | | // | You should have received a copy of the GNU General Public License | // | along with this program; if not, write to the Free Software Foundation, | // | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | // | | // +---------------------------------------------------------------------------+
<?php /* Reminder: always indent with 4 spaces (no tabs). */ // +---------------------------------------------------------------------------+ // | Timer Example | // +---------------------------------------------------------------------------+ // | timer.js.php | // | | // | Public plugin page | // +---------------------------------------------------------------------------+ // | Copyright (C) 2009 by the following authors: | // | | // | Authors: suprsidr - suprsidr AT flashyourweb DOT com | // +---------------------------------------------------------------------------+ // | Created with the Geeklog Plugin Toolkit. | // +---------------------------------------------------------------------------+ // | | // | This program is free software; you can redistribute it and/or | // | modify it under the terms of the GNU General Public License | // | as published by the Free Software Foundation; either version 2 | // | of the License, or (at your option) any later version. | // | | // | This program is distributed in the hope that it will be useful, | // | but WITHOUT ANY WARRANTY; without even the implied warranty of | // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | // | GNU General Public License for more details. | // | | // | You should have received a copy of the GNU General Public License | // | along with this program; if not, write to the Free Software Foundation, | // | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | // | | // +---------------------------------------------------------------------------+
/**
* @package Timer Example
* This file does not have to be php, but if it is we can include php
* variables or functions within our scope.
* Or keep it purely js and fetch our vars with a function like fetchVars below.
*/
//require_once '../lib-common.php'; $_CONF['timer_interval'] = 2000; header('content-type: application/x-javascript'); ?> varcount = 0; var total; var chunkSize; var sendTimer; var totalChunks;
if(!$mail->Send()){
COM_errorLog("There has been a mail error sending to " . $A['email'], 1); } // Clear all addresses and attachments for next loop $mail->ClearAddresses(); $mail->ClearAttachments(); }else{ list($emails) = NL_fetchWhitelist(); foreach($emailsas$email){
COM_errorLog("Test send to: " . $email , 1); /* $body = $content;
$body .= sprintf( $LANG_NL['trouble_viewing'], $_CONF['site_url'], $nl_id);
$body .= '<br /><a href="'.$_CONF['site_url'].'/newsletter/index.php?view=delete&email='.$email.'">'. $LANG_NL['unsubscribe'] .'</a>';
$mail->Body = $body;
$mail->AltBody = htmlspecialchars(body);
$mail->AddAddress($email);
if(!$mail->Send()){
COM_errorLog( "There has been a mail error sending to " . $email, 1);
}
// Clear all addresses and attachments for next loop
$mail->ClearAddresses();
$mail->ClearAttachments();*/ }
NL_sendLock($nl_id, $sent_time); } }
Ok maybe to many post but I solved my issue with all french accents (NL_changeAccented($body) and NL_changeAccented($title)) and apostrophes (stripslashes($body)).
PHP Formatted Code
function NL_mailIt($nl_id, $title, $content, $test=false) { global$_CONF, $_USER, $_TABLES, $LANG_NL;
if(!$mail->Send()){
COM_errorLog("There has been a mail error sending to " . $A['email'], 1); } // Clear all addresses and attachments for next loop $mail->ClearAddresses(); $mail->ClearAttachments(); }else{ list($emails) = NL_fetchWhitelist(); foreach($emailsas$email){
COM_errorLog("Test send to: " . $email , 1); }
NL_sendLock($nl_id, $sent_time); } }
if(!$mail->Send()){
COM_errorLog( "There has been a mail error sending to " . $email, 1);
}
// Clear all addresses and attachments for next loop
$mail->ClearAddresses();
$mail->ClearAttachments();*/
That was from the buggy version I let out.
I was testing by logging to errorlog and forgot switch back before release.
the latest should have that and many more bugs fixed.
if(!$mail->Send()){
COM_errorLog("There has been a mail error sending to " . $A['email'], 1); } // Clear all addresses and attachments for next loop $mail->ClearAddresses(); $mail->ClearAttachments(); }else{ list($emails) = NL_fetchWhitelist(); foreach($emailsas$email){
COM_errorLog("Test send to: " . $email , 1); /* $body = $content;
$body .= sprintf( $LANG_NL['trouble_viewing'], $_CONF['site_url'], $nl_id);
$body .= '<br /><a href="'.$_CONF['site_url'].'/newsletter/index.php?view=delete&email='.$email.'">'. $LANG_NL['unsubscribe'] .'</a>';
$mail->Body = $body;
$mail->AltBody = htmlspecialchars(body);
$mail->AddAddress($email);
if(!$mail->Send()){
COM_errorLog( "There has been a mail error sending to " . $email, 1);
}
// Clear all addresses and attachments for next loop
$mail->ClearAddresses();
$mail->ClearAttachments();*/ }
NL_sendLock($nl_id, $sent_time); } }
if(!$mail->Send()){
COM_errorLog( "There has been a mail error sending to " . $email, 1);
}
// Clear all addresses and attachments for next loop
$mail->ClearAddresses();
$mail->ClearAttachments();*/
if(!$mail->Send()){
COM_errorLog("There has been a mail error sending to " . $email, 1); } // Clear all addresses and attachments for next loop $mail->ClearAddresses(); $mail->ClearAttachments();
otherwise you'll simply log and not actually send.(It does send the test though).
I'm working with the glfusion 1.1.8 and I've been trying and reading everything I can find regarding how to install your newsletter plugin. I was told by another person in the glfusion form log that the plugin does work in glfusion. Can you direct me to a link tat gives step by step instructions. Thanks!