* *
* -------------------------------------------------------------------- *
* File : what-send_newsletter.php *
* *
* -------------------------------------------------------------------- *
* File : what-send_newsletter.php *
* For more information visit: http://www.mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
* For more information visit: http://www.mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
-if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
- $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php';
- require($INC);
-}
+if ((!defined('__SECURITY')) || (!isAdmin())) {
+ die();
+} // END - if
WHERE
`status`='CONFIRMED' AND `nl_receive`='Y'
ORDER BY
`userid` ASC", __FILE__, __LINE__);
WHERE
`status`='CONFIRMED' AND `nl_receive`='Y'
ORDER BY
`userid` ASC", __FILE__, __LINE__);
// Members are available so we can send out the newsletter!
while ($content = SQL_FETCHARRAY($result)) {
// Construct mail...
$template = 'newsletter';
// Check for extension and sending-mode
// Members are available so we can send out the newsletter!
while ($content = SQL_FETCHARRAY($result)) {
// Construct mail...
$template = 'newsletter';
// Check for extension and sending-mode
- $message = LOAD_EMAIL_TEMPLATE($template, array('text' => REQUEST_POST('text')), $content['userid']);
+ $message = loadEmailTemplate($template, array('text' => postRequestParameter('text')), $content['userid']);
- SEND_NEWSLETTER($content['email'], REQUEST_POST('subject'), $message, REQUEST_POST('mode'));
- }
-
- // Free memory
- SQL_FREERESULT($result);
+ sendNewsletter($content['email'], postRequestParameter('subject'), $message, postRequestParameter('mode'));
+ } // END - while
- // @TODO Rewrite this constant
- define('_DATESTAMP', generateDateTime(time(), '3'));
- if (EXT_IS_ACTIVE('html_mail')) {
+ $content['datestamp'] = generateDateTime(time(), 3);
+
+ // Extension html_mail installed?
+ if (isExtensionActive('html_mail')) {